Blame view
src/pages/detailsChoiceArgs/detailsChoiceArgs.vue
22.2 KB
ab4209caf update |
1 |
<template> |
f112b6434 全面屏适配 |
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
<view class="content"> <view class="goods-info"> <image src="../../static/myorder-paying-pic.png"></image> <view class="box-right"> <text class="p1">镜片名称型号功能镜片名称型镜片名称型号功能非球面…</text> <text class="p2">支持7天无理由退货 顺丰发货</text> <view class="priceBox"> <view class="price">¥{{price*count}}</view> <view class="counter"> <view class="btn" disabled="this.disabled" @click="counter(false)" >-</view> <text>{{count}}</text> <view class="btn" @click="counter(true)" >+</view> </view> </view> </view> </view> <view class="goods-data"> <view class="opCollapse"> <!-- <view class="head"> |
ab4209caf update |
28 29 |
<view v-if="!opIsOpen">填写验光数据</view> <view v-else></view> |
eab89b254 updates |
30 |
<view class="headRighted" v-if="opIsOpen" @click="myCollapseChange(opIsOpen)"></view> |
f112b6434 全面屏适配 |
31 |
<view class="headRight" v-else @click="myCollapseChange(opIsOpen)" ></view> |
7d6833f2c 地址列表 |
32 |
</view> --> |
f112b6434 全面屏适配 |
33 34 35 36 37 38 39 |
<view class="body"> <template v-if="opIsOpen"> <view class="goods-form"> <view class="data-title"> <image src="../../static/icon-data.png"></image> <text class="p1">填写验光数据</text> </view> |
7d6833f2c 地址列表 |
40 |
<text class="p2">没有验光数据?请到线下眼镜店验光哦~</text> |
f112b6434 全面屏适配 |
41 |
<view class="picker"> |
7d6833f2c 地址列表 |
42 43 44 45 |
<view class="picker-choice"> <view class="choice-left"> <text class="p11">验光单取名:</text> </view> |
f112b6434 全面屏适配 |
46 47 48 49 |
<input class="choice-name uni-input" placeholder="下系" /> |
7d6833f2c 地址列表 |
50 51 |
</view> </view> |
f112b6434 全面屏适配 |
52 53 54 55 56 |
<view class="picker"> <view class="picker-choice"> <view class="choice-left"> <text class="p11">{{pickerInfoList[0].nameC}}</text> <text class="p12">{{pickerInfoList[0].nameE}}</text> |
7d6833f2c 地址列表 |
57 |
</view> |
f112b6434 全面屏适配 |
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
<text class="p13">左 (OD)</text> <text class="p14">{{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}}</text> <picker @change="bindPickerChange01" :value="pickerInfoList[0].nameIndex1" :range="pickerInfoList[0].nameArray1" > <image src="../../static/detail-tabicon.png"></image> </picker> <text class="p13">右 (OS)</text> <text class="p14">{{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}}</text> <picker @change="bindPickerChange02" :value="pickerInfoList[0].nameIndex2" :range="pickerInfoList[0].nameArray2" > <image src="../../static/detail-tabicon.png"></image> </picker> </view> |
7d6833f2c 地址列表 |
77 |
</view> |
f112b6434 全面屏适配 |
78 79 80 81 82 |
<view class="picker"> <view class="picker-choice"> <view class="choice-left"> <text class="p11">{{pickerInfoList[1].nameC}}</text> <text class="p12">{{pickerInfoList[1].nameE}}</text> |
7d6833f2c 地址列表 |
83 |
</view> |
f112b6434 全面屏适配 |
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
<text class="p13">左 (OD)</text> <text class="p14">{{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}}</text> <picker @change="bindPickerChange11" :value="pickerInfoList[1].nameIndex1" :range="pickerInfoList[1].nameArray1" > <image src="../../static/detail-tabicon.png"></image> </picker> <text class="p13">右 (OS)</text> <text class="p14">{{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}}</text> <picker @change="bindPickerChange12" :value="pickerInfoList[1].nameIndex2" :range="pickerInfoList[1].nameArray2" > <image src="../../static/detail-tabicon.png"></image> </picker> </view> |
7d6833f2c 地址列表 |
103 |
</view> |
f112b6434 全面屏适配 |
104 105 106 107 108 |
<view class="picker"> <view class="picker-choice"> <view class="choice-left"> <text class="p11">{{pickerInfoList[2].nameC}}</text> <text class="p12">{{pickerInfoList[2].nameE}}</text> |
7d6833f2c 地址列表 |
109 |
</view> |
f112b6434 全面屏适配 |
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
<text class="p13">左 (OD)</text> <text class="p14">{{pickerInfoList[2].nameArray1[pickerInfoList[2].nameIndex1]}}</text> <picker @change="bindPickerChange21" :value="pickerInfoList[2].nameIndex1" :range="pickerInfoList[2].nameArray1" > <image src="../../static/detail-tabicon.png"></image> </picker> <text class="p13">右 (OS)</text> <text class="p14">{{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}}</text> <picker @change="bindPickerChange22" :value="pickerInfoList[2].nameIndex2" :range="pickerInfoList[2].nameArray2" > <image src="../../static/detail-tabicon.png"></image> </picker> </view> |
7d6833f2c 地址列表 |
129 |
</view> |
f112b6434 全面屏适配 |
130 131 132 133 134 |
<view class="picker"> <view class="picker-choice"> <view class="choice-left"> <text class="p11">{{pickerInfoList[3].nameC}}</text> <text class="p12">{{pickerInfoList[3].nameE}}</text> |
7d6833f2c 地址列表 |
135 |
</view> |
f112b6434 全面屏适配 |
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
<text class="p13">左 (OD)</text> <text class="p14">{{pickerInfoList[3].nameArray1[pickerInfoList[3].nameIndex1]}}</text> <picker @change="bindPickerChange31" :value="pickerInfoList[3].nameIndex1" :range="pickerInfoList[3].nameArray1" > <image src="../../static/detail-tabicon.png"></image> </picker> <text class="p13">右 (OS)</text> <text class="p14">{{pickerInfoList[3].nameArray2[pickerInfoList[3].nameIndex2]}}</text> <picker @change="bindPickerChange32" :value="pickerInfoList[3].nameIndex2" :range="pickerInfoList[3].nameArray2" > <image src="../../static/detail-tabicon.png"></image> </picker> </view> |
7d6833f2c 地址列表 |
155 |
</view> |
f112b6434 全面屏适配 |
156 157 158 159 |
<view class="picker"> <view class="picker-choice"> <view class="choice-left"> <text class="p11">{{pickerInfoList[4].nameC}}</text> |
7d6833f2c 地址列表 |
160 |
</view> |
f112b6434 全面屏适配 |
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
<text class="p13-date">年 (Y)</text> <text class="p14" style="width: 34px;" >{{pickerInfoList[4].nameArray1[pickerInfoList[4].nameIndex1]}}</text> <picker @change="bindPickerChange41" :value="pickerInfoList[4].nameIndex1" :range="pickerInfoList[4].nameArray1" > <image src="../../static/detail-tabicon.png"></image> </picker> <text class="p13-date">月 (M)</text> <text class="p14" style="width: 30px;" >{{pickerInfoList[4].nameArray2[pickerInfoList[4].nameIndex2]}}</text> <picker @change="bindPickerChange42" :value="pickerInfoList[4].nameIndex2" :range="pickerInfoList[4].nameArray2" > <image src="../../static/detail-tabicon.png"></image> </picker> <text class="p13-date">日 (D)</text> <text class="p14" style="width: 30px;" >{{pickerInfoList[4].nameArray3[pickerInfoList[4].nameIndex3]}}</text> <picker @change="bindPickerChange43" :value="pickerInfoList[4].nameIndex3" :range="pickerInfoList[4].nameArray3" > <image src="../../static/detail-tabicon.png"></image> </picker> </view> |
7d6833f2c 地址列表 |
198 199 |
</view> <view class="confirm"> |
f112b6434 全面屏适配 |
200 201 202 203 204 |
<image :src="tablist.confirm ? tabicon[0] : tabicon[1]" @click="changeConfirm" ></image> <text>确认以上输入信息来源于我的验光数据!</text> |
7d6833f2c 地址列表 |
205 |
</view> |
f112b6434 全面屏适配 |
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
</view> </template> <template v-else> <view v-for="item in pickerInfoList" :key="item.key" class="bodyBox" > <template v-if="item.nameC==='验光日期'"> <text class="names">{{item.nameC}}</text> <text style="margin-right: 5px;">{{item.nameArray1[item.nameIndex1]}}年</text> <text style="margin-right: 5px;">{{item.nameArray2[item.nameIndex2]}}月</text> <text>{{item.nameArray3[item.nameIndex2]}}日</text> </template> <template v-else> <template v-if="item.nameC==='度数'"> <text style="display: inline;">*</text> </template> <text class="names">{{item.nameC}}</text> <text style="margin-right: 10px;">左 {{item.nameArray1[item.nameIndex1]}}</text> <text>右 {{item.nameArray2[item.nameIndex2]}}</text> </template> </view> </template> </view> </view> <!-- 实用功能折叠框 --> <MyCollapse :isOpenProps="funIsOpen" :funListProp="funList" :funContentProp="funContent" title="实用功能" ></MyCollapse> <MyCollapse :isOpenProps="kindIsOpen" :funListProp="kindList1" :funList2Prop="kindList2" :funContentProp="kindContent" title="镜片种类" ></MyCollapse> <MyCollapse :isOpenProps="maIsOpen" :funListProp="maList1" :funList2Prop="maList2" :funContentProp="maContent" title="材质选择" ></MyCollapse> <MyCollapse :isOpenProps="reIsOpen" :funListProp="reList1" :funList2Prop="reList2" :funContentProp="reContent" title="折射率" ></MyCollapse> <view v-for="item in attrList" :key="item.mid" > <MyCollapse :funListProp="item" :funContentProp="reContent" :title="item.meta_name" /> </view> </view> <view class="submit">立即结算</view> </view> |
ab4209caf update |
275 276 277 |
</template> <script> |
f112b6434 全面屏适配 |
278 279 |
import MyCollapse from './compoents/MyCollapse.vue' import store from '@/store' |
7d6833f2c 地址列表 |
280 |
|
f112b6434 全面屏适配 |
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 |
export default { components: { MyCollapse, }, data() { return { count: 1, disabled: false, price: 180, // 实用功能参数 funIsOpen: true, // 默认myCollapse开启 funList: [ { name: '防紫外线', isChioce: false, key: 1, type: 'fun' }, { name: '防蓝光', isChioce: false, key: 2, type: 'fun' }, { name: '智能变色', isChioce: false, key: 3, type: 'fun' }, { name: '易清洁', isChioce: false, key: 4, type: 'fun' }, { name: '防辐射', isChioce: false, key: 5, type: 'fun' }, { name: '抗疲劳', isChioce: false, key: 6, type: 'fun' }, ], funContent: [], // 镜片种类参数 kindIsOpen: true, kindList1: [ { name: '染色', isChioce: false, key: 1, type: 'kind' }, { name: '渐变', isChioce: false, key: 2, type: 'kind' }, ], kindList2: [ { name: 'JB234759', isChioce: false, key: 3, type: 'kind' }, { name: 'JB234759', isChioce: false, key: 4, type: 'kind' }, { name: 'JB234759', isChioce: false, key: 5, type: 'kind' }, { name: 'JB234759', isChioce: false, key: 6, type: 'kind' }, { name: 'JB234759', isChioce: false, key: 7, type: 'kind' }, ], kindContent: [], // 材质选择 maIsOpen: true, maList1: [ { name: '树脂镜片', isChioce: false, key: 1, range: '0-300度', isRange: true }, { name: '特殊镜片', isChioce: false, key: 2 }, ], maList2: [ { name: '玻璃镜片', isChioce: false, key: 3, range: '300-1000度', isRange: true }, { name: '玻璃镜片', isChioce: false, key: 4 }, ], maContent: [], // 折射率参数 reIsOpen: true, reList1: [ { name: '1.56(推荐)', isChioce: false, key: 1, range: '0-300度', isRange: true }, { name: '1.60', isChioce: false, key: 2 }, ], reList2: [ { name: '1.71(推荐)', isChioce: false, key: 3, range: '300-1000度', isRange: true }, { name: '1.67', isChioce: false, key: 4 }, { name: '1.71', isChioce: false, key: 5 }, { name: '1.74', isChioce: false, key: 6 }, ], reContent: [], // 验光参数 opIsOpen: true, tablist: { // read: true, // seeLong: false, confirm: false, }, tabicon: ['/static/detail-button.png', '/static/detail-button-unselected.png'], // 度数相关数据 pickerInfoList: [ { nameC: '度数', nameE: '(SPH)', nameArray1: [1.5, 2.5, 3.5, 4.5], nameIndex1: 0, nameArray2: [1.5, 2.5, 3.5, 4.5], nameIndex2: 0, key: 0 }, { nameC: '散光', nameE: '(CYL)', nameArray1: [1.5, 2.5, 3.5, 4.5], nameIndex1: 0, nameArray2: [1.5, 2.5, 3.5, 4.5], nameIndex2: 0, key: 1 }, { nameC: '散光轴位', nameE: '(AXI)', nameArray1: [1.5, 2.5, 3.5, 4.5], nameIndex1: 0, nameArray2: [1.5, 2.5, 3.5, 4.5], nameIndex2: 0, key: 2 }, { nameC: '双眼瞳距', nameE: '(PD)', nameArray1: [1.5, 2.5, 3.5, 4.5], nameIndex1: 0, nameArray2: [1.5, 2.5, 3.5, 4.5], nameIndex2: 0, key: 3 }, { nameC: '验光日期', nameE: '', nameArray1: [2017, 2018, 2019, 2020, 2021], nameIndex1: 0, nameArray2: [1, 2, 3, 4, 5, 6, 7], nameIndex2: 0, nameArray3: [1, 2, 3, 4, 5, 6], nameIndex3: 0 }, ], |
ab4209caf update |
355 |
|
f112b6434 全面屏适配 |
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 |
} }, onLoad() { store.dispatch('read/fetch', { pid: 9, }) }, computed: { attrList() { return this.$store.state.read.goodInfo.attrList }, }, methods: { counter(isadd) { if (isadd) { this.count++ } else { this.count <= 1 ? this.disabled = true : this.count-- } }, myCollapseChange(isopen) { // console.log(isopen) this.opIsOpen = !isopen }, changeConfirm() { this.tablist.confirm = !this.tablist.confirm }, |
ab4209caf update |
383 |
|
f112b6434 全面屏适配 |
384 385 386 387 388 389 |
bindPickerChange01: function(e) { this.pickerInfoList[0].nameIndex1 = e.target.value }, bindPickerChange02: function(e) { this.pickerInfoList[0].nameIndex2 = e.target.value }, |
ab4209caf update |
390 |
|
f112b6434 全面屏适配 |
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 |
bindPickerChange11: function(e) { this.pickerInfoList[1].nameIndex1 = e.target.value }, bindPickerChange12: function(e) { this.pickerInfoList[1].nameIndex2 = e.target.value }, bindPickerChange21: function(e) { this.pickerInfoList[2].nameIndex1 = e.target.value }, bindPickerChange22: function(e) { this.pickerInfoList[2].nameIndex2 = e.target.value }, bindPickerChange31: function(e) { this.pickerInfoList[3].nameIndex1 = e.target.value }, bindPickerChange32: function(e) { this.pickerInfoList[3].nameIndex2 = e.target.value }, bindPickerChange41: function(e) { this.pickerInfoList[4].nameIndex1 = e.target.value }, bindPickerChange42: function(e) { this.pickerInfoList[4].nameIndex2 = e.target.value }, bindPickerChange43: function(e) { this.pickerInfoList[4].nameIndex3 = e.target.value }, }, } </script> <style lang="scss" scoped> .content { width: 100%; background-color: #f2f2f2; display: flex; flex-direction: column; align-items: center; } .choice-name { border-bottom: 1px solid #cfcfcf; } .goods-info { width: 100%; height: 272rpx; box-sizing: border-box; padding: 40rpx 40rpx 36rpx 36rpx; margin: 36rpx 0 18rpx 0; // margin-bottom: -18rpx; // margin-top: -36rpx; background: #ffffff; border-radius: 16rpx; display: flex; image { width: 94px; height: 94px; margin-right: 28rpx; } .box-right { width: 458rpx; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; .p1 { // font-family: PingFangSC-Regular; font-size: 14px; color: #333333; letter-spacing: -0.26px; text-align: justify; line-height: 18px; |
7d6833f2c 地址列表 |
465 466 |
} .p2 { |
f112b6434 全面屏适配 |
467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 |
// font-family: PingFangSC-Regular; font-size: 10px; color: #999999; letter-spacing: -0.19px; margin-top: -20rpx; } .priceBox { display: flex; flex-direction: row; justify-content: space-between; width: 100%; .price { color: #ff6b4a; font-size: 28rpx; } .counter { display: flex; flex-direction: row; justify-content: space-between; font-size: 28rpx; color: #333333; width: 122rpx; .btn { display: flex; justify-content: center; line-height: 32rpx; height: 32rpx; width: 32rpx; background-color: #f2f2f2; color: #cfcfcf; } } } } } .goods-data { width: 100%; box-sizing: border-box; padding: 37rpx 40rpx 0 40rpx; background: #ffffff; border-radius: 12rpx; margin-bottom: 92px; .opCollapse { width: 100%; padding-bottom: 28rpx; margin-top: 7px; border-bottom: 1px solid #e9e9e9; .head { display: flex; justify-content: space-between; height: 24px; // font-family: PingFangSC-Medium; font-size: 16px; color: #333333; letter-spacing: -0.3px; text-align: justify; line-height: 24px; margin-bottom: 18rpx; .headRighted { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 4px solid #cfcfcf; transform: scaleY(-1); margin-top: 10px; } .headMid { // font-family: PingFangSC-Regular; font-size: 10px; |
7d6833f2c 地址列表 |
538 |
color: #999999; |
f112b6434 全面屏适配 |
539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 |
letter-spacing: -0.19px; margin-left: -120rpx; } .headRight { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 4px solid #cfcfcf; margin-top: 10px; } } .body { // font-family: PingFangSC-Regular; font-size: 12px; color: #666666; letter-spacing: 0; .bodyBox { margin-top: 15px; .names { // font-family: PingFangSC-Regular; font-size: 12px; color: #151515; letter-spacing: 0; text-align: justify; line-height: 17px; margin-left: 5px; margin-right: 10px; } text { // font-family: PingFangSC-Regular; font-size: 12px; color: #666666; letter-spacing: 0; text-align: justify; } } |
7d6833f2c 地址列表 |
576 |
} |
f112b6434 全面屏适配 |
577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 |
} } .goods-form { display: flex; flex-direction: column; align-items: center; justify-content: center; background-color: #fff; width: 100%; .p1 { font-size: 16px; color: #333333; letter-spacing: -0.3px; text-align: justify; line-height: 24px; margin: 4px 0; } .p2 { font-size: 12px; color: #999999; letter-spacing: -0.23px; margin-bottom: 18rpx; } image { width: 28rpx; height: 26rpx; } .confirm { display: flex; align-items: center; font-size: 12px; color: #666666; letter-spacing: -0.23px; width: 684rpx; image { margin-right: 25rpx; |
7d6833f2c 地址列表 |
614 |
} |
f112b6434 全面屏适配 |
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
} .picker { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; image { width: 10px; height: 10px; margin-right: 5px; } .picker-choice { display: flex; width: 684rpx; align-items: center; margin-bottom: 40rpx; .choice-left { width: 210rpx; .p11 { font-size: 14px; color: #333333; letter-spacing: -0.26px; text-align: justify; line-height: 24px; // margin-right: 10px; } .p12 { font-size: 10px; color: #3f3f3f; letter-spacing: -0.19px; text-align: justify; line-height: 24px; |
7d6833f2c 地址列表 |
648 |
} |
f112b6434 全面屏适配 |
649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 |
} .p13 { font-size: 10px; color: #999999; letter-spacing: -0.19px; margin-right: 10px; } .p13-date { font-size: 10px; color: #999999; letter-spacing: -0.19px; margin-right: 5px; } .p14 { font-size: 14px; color: #666666; letter-spacing: -0.26px; text-align: center; width: 124rpx; border-bottom: 1px solid #cfcfcf; } |
7d6833f2c 地址列表 |
670 |
} |
f112b6434 全面屏适配 |
671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 |
} } .submit { width: 100%; height: 112rpx; background: #ff6b4a; position: fixed; bottom: 0; text-align: center; line-height: 112rpx; // font-family: PingFangSC-Regular; font-size: 16px; color: #ffffff; letter-spacing: -0.3px; /* iphonex 等安全区设置,底部安全区适配 */ /* #ifndef APP-NVUE */ padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom); /* #endif */ } |
ab4209caf update |
692 |
</style> |