Commit daf137d6fdb9a5992261ea0bf7a5ac6a3259250c
Exists in
master
合并冲突
Showing
10 changed files
Show diff stats
src/pages/addOpticsData/addOpticsData.vue
| ... | ... | @@ -26,9 +26,9 @@ |
| 26 | 26 | <!-- 数据展示部分 --> |
| 27 | 27 | <view class="dataMenu"> |
| 28 | 28 | <uni-collapse accordion="true"> |
| 29 | - <view class="item" v-for="(loveItem,index) in loveList" :key="index"> | |
| 29 | + <view class="item" v-for="(loveItem,index) in loveList" :key="index" > | |
| 30 | 30 | <uni-collapse-item :title='loveItem.name' :time='getRightTime(loveItem.in_time)' :iconText='getFirstName(loveItem.name)' showAnimation='true'> |
| 31 | - <view class="loveDataInfo"> | |
| 31 | + <view class="loveDataInfo" @click="toNewData(2,index)"> | |
| 32 | 32 | <view class="dataInfoItem"> |
| 33 | 33 | <text>度数(SPH):</text><text>左:{{loveItem.leftSph}}</text><text>右:{{loveItem.rightSph}}</text> |
| 34 | 34 | </view> |
| ... | ... | @@ -47,7 +47,7 @@ |
| 47 | 47 | </uni-collapse> |
| 48 | 48 | </view> |
| 49 | 49 | <view class="footer"> |
| 50 | - <button class="btn" type="default" @click="toNewData">新建验光单</button> | |
| 50 | + <button class="btn" type="default" @click="toNewData(1)">新建验光单</button> | |
| 51 | 51 | </view> |
| 52 | 52 | </view> |
| 53 | 53 | </template> |
| ... | ... | @@ -67,7 +67,7 @@ |
| 67 | 67 | onLoad: function(option) { |
| 68 | 68 | //获取关心的人列表 |
| 69 | 69 | store.dispatch('myLoveList/getLoveList', { |
| 70 | - uid: "1", | |
| 70 | + uid: this.$store.state.user.userInfo.uid, | |
| 71 | 71 | }); |
| 72 | 72 | }, |
| 73 | 73 | computed:{ |
| ... | ... | @@ -99,9 +99,21 @@ |
| 99 | 99 | getFirstName(name){ |
| 100 | 100 | return name.substring(0,1) |
| 101 | 101 | }, |
| 102 | - toNewData(){ | |
| 102 | + toNewData(item,index){ | |
| 103 | + // const args={ | |
| 104 | + // name:loveItem.name, | |
| 105 | + // pd:loveItem.pd, | |
| 106 | + // leftSph:loveItem.leftSph, | |
| 107 | + // rightSph:loveItem.rightSph, | |
| 108 | + // leftCyl:loveItem.leftCyl, | |
| 109 | + // rightCyl:loveItem.rightCyl, | |
| 110 | + // leftAxi:loveItem.leftAxi, | |
| 111 | + // rightAxi:loveItem.rightAxi | |
| 112 | + // } | |
| 103 | 113 | uni.navigateTo({ |
| 104 | - url:'../newOpticsData/newOpticsData' | |
| 114 | + // kinds 参数为 1 表示添加新的验光单, 2 表示更新验光单 | |
| 115 | + // name 表示修改的人名儿,pd瞳距 | |
| 116 | + url:'../newOpticsData/newOpticsData?kinds='+item+'&index='+index | |
| 105 | 117 | }) |
| 106 | 118 | } |
| 107 | 119 | } |
| ... | ... | @@ -145,6 +157,7 @@ |
| 145 | 157 | box-shadow: 0 0 4px 0 rgba(133,107,107,0.10); |
| 146 | 158 | width: 100%; |
| 147 | 159 | background-color: #FFFFFF; |
| 160 | + margin-bottom: 120rpx; | |
| 148 | 161 | .item{ |
| 149 | 162 | padding: 0 40rpx; |
| 150 | 163 | .loveDataInfo{ | ... | ... |
src/pages/detailStandard/detailStandard_k.vue
| ... | ... | @@ -17,10 +17,13 @@ |
| 17 | 17 | </view> |
| 18 | 18 | <view class="choose"> |
| 19 | 19 | <view class="colour"> |
| 20 | - <view class="colour1"><span>框架颜色</span><image src="/static/img/detail/xiala.png"></image></view> | |
| 21 | - <view class="colour_exp">*{{colour}}</view> | |
| 20 | + <view class="colour1" @click="xialachange(0)"> | |
| 21 | + <text>框架颜色</text> | |
| 22 | + <image v-bind:src="isNone[0].img"></image> | |
| 23 | + </view> | |
| 24 | + <view class="colour_exp">*{{navData.colour}}</view> | |
| 22 | 25 | <view> |
| 23 | - <view class="colour2"> | |
| 26 | + <view class="colour2" v-bind:class="{'colour2_none' : isNone[0].state}"> | |
| 24 | 27 | <view |
| 25 | 28 | v-for="(items,index) in details.data.skuList" |
| 26 | 29 | :key="index" |
| ... | ... | @@ -35,14 +38,14 @@ |
| 35 | 38 | <hr/> |
| 36 | 39 | </view> |
| 37 | 40 | <view class="size"> |
| 38 | - <view class="size1"> | |
| 41 | + <view class="size1" @click="xialachange(1)"> | |
| 39 | 42 | <view class="size1_1">框架尺寸</view> |
| 40 | - <view><span>+¥20</span><image src="/static/img/detail/xiala.png"></image></view> | |
| 43 | + <view><image v-bind:src="isNone[1].img"></image></view> | |
| 41 | 44 | </view> |
| 42 | 45 | <view class="colour"> |
| 43 | - <view class="colour_exp">*{{colour}}</view> | |
| 46 | + <view class="colour_exp">*{{navData.colour}}</view> | |
| 44 | 47 | </view> |
| 45 | - <view class="D3_list"> | |
| 48 | + <view class="D3_list" v-bind:class="{'colour2_none' : isNone[1].state}"> | |
| 46 | 49 | <view> |
| 47 | 50 | <view><image class="D3_image" v-bind:src ="parameter[0].img"></image></view> |
| 48 | 51 | <view class="D3_list_jDu"> |
| ... | ... | @@ -98,12 +101,15 @@ |
| 98 | 101 | </view> |
| 99 | 102 | </view> |
| 100 | 103 | <view class="part"> |
| 101 | - <view class="size1"> | |
| 102 | - <view class="size1_1">配件</view> | |
| 103 | - <view><span>+¥0.00</span><image src="/static/img/detail/xiala.png"></image></view> | |
| 104 | + <view class="size1" @click="xialachange(2)"> | |
| 105 | + <view class="size1_1" >配件</view> | |
| 106 | + <view> | |
| 107 | + <span>+¥0.00</span> | |
| 108 | + <image v-bind:src="isNone[2].img"></image> | |
| 109 | + </view> | |
| 104 | 110 | </view> |
| 105 | 111 | <view class="colour_exp">*0290</view> |
| 106 | - <view class="part_som"> | |
| 112 | + <view class="part_som" v-bind:class="{'colour2_none' : isNone[2].state}"> | |
| 107 | 113 | <view |
| 108 | 114 | v-for="(part) in part" |
| 109 | 115 | :key="part.key" |
| ... | ... | @@ -123,7 +129,7 @@ |
| 123 | 129 | </view> |
| 124 | 130 | </view> |
| 125 | 131 | <view class="zhanwei"></view> |
| 126 | - <view class="button"><view>立即结算</view></view> | |
| 132 | + <view class="button"><view @click="popSure(details.data.p_name,details.data.p_sale_price)" >立即结算</view></view> | |
| 127 | 133 | </view> |
| 128 | 134 | </template> |
| 129 | 135 | <script> |
| ... | ... | @@ -137,8 +143,25 @@ export default { |
| 137 | 143 | data(){ |
| 138 | 144 | return{ |
| 139 | 145 | count: 1, |
| 140 | - colour: '1.56非球面防蓝光_亚黑色', | |
| 146 | + // colour: '1.56非球面防蓝光_亚黑色', | |
| 141 | 147 | chooseNum : '', |
| 148 | + isNone:[ | |
| 149 | + {state: false ,img: '/static/img/detail/xiala.png'}, | |
| 150 | + {state: false ,img: '/static/img/detail/xiala.png'}, | |
| 151 | + {state: false ,img: '/static/img/detail/xiala.png'}, | |
| 152 | + {state: false ,img: '/static/img/detail/xiala.png'}, | |
| 153 | + {state: false ,img: '/static/img/detail/xiala.png'}, | |
| 154 | + ], | |
| 155 | + //传参 | |
| 156 | + navData:{ | |
| 157 | + pid: "26", | |
| 158 | + p_root_index: "2", | |
| 159 | + name:'', | |
| 160 | + price:'', | |
| 161 | + colour: '1.56非球面防蓝光_亚黑色', | |
| 162 | + }, | |
| 163 | + | |
| 164 | + //尺寸 | |
| 142 | 165 | parameter:[ |
| 143 | 166 | {key: 0,img:'/static/img/detail/d2.png', standard:'框架宽', slength:139}, |
| 144 | 167 | {key: 1,img:'/static/img/detail/d3.png', standard:'镜片宽', slength:51}, |
| ... | ... | @@ -168,7 +191,8 @@ export default { |
| 168 | 191 | onLoad:function(){ |
| 169 | 192 | store.dispatch('detailStandard_k/fetch', { |
| 170 | 193 | uid: "1", |
| 171 | - pid: "26", | |
| 194 | + pid: "26", | |
| 195 | + p_root_index: "2" | |
| 172 | 196 | }); |
| 173 | 197 | // console.log(this.$store.state.detailStandard_k.list+'ssss'); |
| 174 | 198 | }, |
| ... | ... | @@ -180,12 +204,20 @@ export default { |
| 180 | 204 | this.count <= 1? this.disabled = true:this.count-- |
| 181 | 205 | } |
| 182 | 206 | }, |
| 207 | + xialachange(index){ | |
| 208 | + this.isNone[index].state = !this.isNone[index].state; | |
| 209 | + if(this.isNone[index].state){ | |
| 210 | + this.isNone[index].img = '/static/img/detail/right.png' | |
| 211 | + }else{ | |
| 212 | + this.isNone[index].img = '/static/img/detail/xiala.png' | |
| 213 | + } | |
| 214 | + }, | |
| 183 | 215 | colourChange(index,e){ |
| 184 | - this.colour = e ; //颜色选择 | |
| 185 | - // console.log(index,e); | |
| 216 | + this.navData.colour = e ; //颜色选择 | |
| 217 | + console.log(index,this.navData.colour); | |
| 186 | 218 | |
| 187 | 219 | }, |
| 188 | - viewChoose(index){ | |
| 220 | + viewChoose(index,e){ | |
| 189 | 221 | this.chooseNum = index |
| 190 | 222 | }, |
| 191 | 223 | popArgs(){ |
| ... | ... | @@ -195,7 +227,17 @@ export default { |
| 195 | 227 | fail: () => {}, |
| 196 | 228 | complete: () => {} |
| 197 | 229 | }); |
| 198 | - } | |
| 230 | + }, | |
| 231 | + //跳转确认订单页及传参 | |
| 232 | + popSure(name,price){ | |
| 233 | + this.navData.name = name; | |
| 234 | + this.navData.price = price; | |
| 235 | + var navData = JSON.stringify(this.navData); | |
| 236 | + uni.navigateTo({ | |
| 237 | + url: '../confirmOrder/confirmOrder?index='+navData, | |
| 238 | + }); | |
| 239 | + console.log(this.navData) | |
| 240 | + }, | |
| 199 | 241 | } |
| 200 | 242 | |
| 201 | 243 | } |
| ... | ... | @@ -333,6 +375,9 @@ hr{ |
| 333 | 375 | } |
| 334 | 376 | } |
| 335 | 377 | } |
| 378 | + .colour2_none{ | |
| 379 | + display: none; | |
| 380 | + } | |
| 336 | 381 | } |
| 337 | 382 | .size,.part{ |
| 338 | 383 | margin-top:14px; |
| ... | ... | @@ -439,6 +484,9 @@ hr{ |
| 439 | 484 | } |
| 440 | 485 | } |
| 441 | 486 | } |
| 487 | + .colour2_none{ | |
| 488 | + display: none; | |
| 489 | + } | |
| 442 | 490 | } |
| 443 | 491 | |
| 444 | 492 | .buy{ | ... | ... |
src/pages/detailStandard/detailStandard_sun.vue
| 1 | 1 | <template> |
| 2 | - <view class="container"> | |
| 2 | +<view> | |
| 3 | + <view class="container" v-if="type===2"> | |
| 3 | 4 | <view class="detail"> |
| 4 | 5 | <view class="detail1"><image v-bind:src="details.data.img_index_url"></image></view> |
| 5 | 6 | <view class="detail2"> |
| ... | ... | @@ -17,10 +18,13 @@ |
| 17 | 18 | </view> |
| 18 | 19 | <view class="choose"> |
| 19 | 20 | <view class="colour"> |
| 20 | - <view class="colour1"><text>框架颜色</text><image src="/static/img/detail/xiala.png"></image></view> | |
| 21 | - <view class="colour_exp">*{{colour}}</view> | |
| 21 | + <view class="colour1" @click="xialachange(0)"> | |
| 22 | + <text>框架颜色</text> | |
| 23 | + <image v-bind:src="isNone[0].img"></image> | |
| 24 | + </view> | |
| 25 | + <view class="colour_exp">*{{navData.colour}}</view> | |
| 22 | 26 | <view> |
| 23 | - <view class="colour2"> | |
| 27 | + <view class="colour2" v-bind:class="{'colour2_none' : isNone[0].state}"> | |
| 24 | 28 | <view |
| 25 | 29 | v-for="(items,index) in details.data.skuList" |
| 26 | 30 | :key="index" |
| ... | ... | @@ -35,9 +39,12 @@ |
| 35 | 39 | <hr/> |
| 36 | 40 | </view> |
| 37 | 41 | <view class="colour"> |
| 38 | - <view class="colour1"><text>镜片颜色</text><image src="/static/img/detail/xiala.png"></image></view> | |
| 42 | + <view class="colour1" @click="xialachange(1)"> | |
| 43 | + <text>镜片颜色</text> | |
| 44 | + <image v-bind:src="isNone[1].img"></image> | |
| 45 | + </view> | |
| 39 | 46 | <view class="colour_exp">*BL192345 粉紫色【限时打折】</view> |
| 40 | - <view> | |
| 47 | + <view v-bind:class="{'colour2_none' : isNone[1].state}"> | |
| 41 | 48 | <view class="jp_colour2"> |
| 42 | 49 | <view |
| 43 | 50 | v-for="(items,index) in jp_colour" |
| ... | ... | @@ -51,20 +58,21 @@ |
| 51 | 58 | <hr/> |
| 52 | 59 | </view> |
| 53 | 60 | <view class="colour"> |
| 54 | - <view class="colour1"> | |
| 61 | + <view class="colour1" @click="xialachange(2)"> | |
| 55 | 62 | <text>{{details.data.attrList[0].meta_name}}</text> |
| 56 | 63 | <text class="colour_exp colour1_span2">注:折射率越高,镜片越薄</text> |
| 57 | - <image src="/static/img/detail/xiala.png"></image> | |
| 64 | + <image v-bind:src="isNone[2].img"></image> | |
| 58 | 65 | </view> |
| 59 | 66 | <view> |
| 60 | - <view class="split"> | |
| 67 | + <view class="colour_exp">*{{navData.split}}</view> | |
| 68 | + <view class="split" v-bind:class="{'colour2_none' : isNone[2].state}"> | |
| 61 | 69 | <view |
| 62 | 70 | v-for="(items,index) in details.data.attrList[0].attr" |
| 63 | 71 | :key="index" |
| 64 | 72 | > |
| 65 | 73 | <view |
| 66 | 74 | class="split_colour2" |
| 67 | - @click="splitChoose(index)" | |
| 75 | + @click="splitChoose(index,items.name)" | |
| 68 | 76 | v-bind:class="{'split_colour2 split_colour2_actived' : isSplit == index}" |
| 69 | 77 | >{{items.name}}</view> |
| 70 | 78 | </view> |
| ... | ... | @@ -73,14 +81,14 @@ |
| 73 | 81 | <hr/> |
| 74 | 82 | </view> |
| 75 | 83 | <view class="size"> |
| 76 | - <view class="size1"> | |
| 84 | + <view class="size1" @click="xialachange(3)"> | |
| 77 | 85 | <view class="size1_1">框架尺寸</view> |
| 78 | - <view><span>+¥20</span><image src="/static/img/detail/xiala.png"></image></view> | |
| 86 | + <view><image v-bind:src="isNone[3].img"></image></view> | |
| 79 | 87 | </view> |
| 80 | 88 | <view class="colour"> |
| 81 | - <view class="colour_exp">*{{colour}}</view> | |
| 89 | + <view class="colour_exp">*{{navData.colour}}</view> | |
| 82 | 90 | </view> |
| 83 | - <view class="D3_list"> | |
| 91 | + <view class="D3_list" v-bind:class="{'colour2_none' : isNone[3].state}"> | |
| 84 | 92 | <view> |
| 85 | 93 | <view><image class="D3_image" v-bind:src ="parameter[0].img"></image></view> |
| 86 | 94 | <view class="D3_list_jDu"> |
| ... | ... | @@ -132,16 +140,253 @@ |
| 132 | 140 | <view>{{parameter[4].standard}}</view> |
| 133 | 141 | </view> |
| 134 | 142 | </view> |
| 135 | - <hr/> | |
| 136 | 143 | </view> |
| 144 | + <hr/> | |
| 137 | 145 | </view> |
| 138 | 146 | <view class="part"> |
| 139 | - <view class="size1"> | |
| 147 | + <view class="size1" @click="xialachange(4)"> | |
| 140 | 148 | <view class="size1_1">配件</view> |
| 141 | - <view><span>+¥0.00</span><image src="/static/img/detail/xiala.png"></image></view> | |
| 149 | + <view><span>+¥0.00</span><image v-bind:src="isNone[4].img"></image></view> | |
| 150 | + </view> | |
| 151 | + <view class="colour_exp">*0290</view> | |
| 152 | + <view class="part_som" v-bind:class="{'colour2_none' : isNone[4].state}"> | |
| 153 | + <view | |
| 154 | + v-for="(part) in part" | |
| 155 | + :key="part.key" | |
| 156 | + v-bind:class="{'size_viewed': part.is_actived}" | |
| 157 | + > | |
| 158 | + <image v-bind:src="part.img"></image> | |
| 159 | + </view> | |
| 160 | + </view> | |
| 161 | + </view> | |
| 162 | + </view> | |
| 163 | + <view class="buy"> | |
| 164 | + <view class="buy1">选了镜框,想选镜片?</view> | |
| 165 | + <view class="buy2">系统已为你保存好已选镜框,放心去选镜片吧!</view> | |
| 166 | + <view class="buy3"> | |
| 167 | + <view class="buy3_1">暂时不选</view> | |
| 168 | + <view class="buy3_2" @click="popArgs">立即去选</view> | |
| 169 | + </view> | |
| 170 | + </view> | |
| 171 | + <template > | |
| 172 | + <view class="goods-form"> | |
| 173 | + <text class="p1">填写验光数据</text> | |
| 174 | + <text class="p2">没有验光数据?请到线下眼镜店验光哦~</text> | |
| 175 | + <view class="picker" > | |
| 176 | + <view class="picker-choice"> | |
| 177 | + <view class="choice-left"> | |
| 178 | + <text class="p11">{{pickerInfoList[0].nameC}}</text> | |
| 179 | + <text class="p12">{{pickerInfoList[0].nameE}}</text> | |
| 180 | + </view> | |
| 181 | + <text class="p13">左 (OD)</text> | |
| 182 | + <text class="p14">{{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}}</text> | |
| 183 | + <picker @change="bindPickerChange01" :value="pickerInfoList[0].nameIndex1" :range="pickerInfoList[0].nameArray1"> | |
| 184 | + <image src="../../static/detail-tabicon.png" ></image> | |
| 185 | + </picker> | |
| 186 | + <text class="p13">右 (OS)</text> | |
| 187 | + <text class="p14">{{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}}</text> | |
| 188 | + <picker @change="bindPickerChange02" :value="pickerInfoList[0].nameIndex2" :range="pickerInfoList[0].nameArray2"> | |
| 189 | + <image src="../../static/detail-tabicon.png" ></image> | |
| 190 | + </picker> | |
| 191 | + </view> | |
| 192 | + </view> | |
| 193 | + <view class="picker" > | |
| 194 | + <view class="picker-choice"> | |
| 195 | + <view class="choice-left"> | |
| 196 | + <text class="p11">{{pickerInfoList[1].nameC}}</text> | |
| 197 | + <text class="p12">{{pickerInfoList[1].nameE}}</text> | |
| 198 | + </view> | |
| 199 | + <text class="p13">左 (OD)</text> | |
| 200 | + <text class="p14">{{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}}</text> | |
| 201 | + <picker @change="bindPickerChange11" :value="pickerInfoList[1].nameIndex1" :range="pickerInfoList[1].nameArray1"> | |
| 202 | + <image src="../../static/detail-tabicon.png" ></image> | |
| 203 | + </picker> | |
| 204 | + <text class="p13">右 (OS)</text> | |
| 205 | + <text class="p14">{{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}}</text> | |
| 206 | + <picker @change="bindPickerChange12" :value="pickerInfoList[1].nameIndex2" :range="pickerInfoList[1].nameArray2"> | |
| 207 | + <image src="../../static/detail-tabicon.png" ></image> | |
| 208 | + </picker> | |
| 209 | + </view> | |
| 210 | + </view> | |
| 211 | + <view class="picker" > | |
| 212 | + <view class="picker-choice"> | |
| 213 | + <view class="choice-left"> | |
| 214 | + <text class="p11">{{pickerInfoList[2].nameC}}</text> | |
| 215 | + <text class="p12">{{pickerInfoList[2].nameE}}</text> | |
| 216 | + </view> | |
| 217 | + <text class="p13">左 (OD)</text> | |
| 218 | + <text class="p14">{{pickerInfoList[2].nameArray1[pickerInfoList[2].nameIndex1]}}</text> | |
| 219 | + <picker @change="bindPickerChange21" :value="pickerInfoList[2].nameIndex1" :range="pickerInfoList[2].nameArray1"> | |
| 220 | + <image src="../../static/detail-tabicon.png" ></image> | |
| 221 | + </picker> | |
| 222 | + <text class="p13">右 (OS)</text> | |
| 223 | + <text class="p14">{{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}}</text> | |
| 224 | + <picker @change="bindPickerChange22" :value="pickerInfoList[2].nameIndex2" :range="pickerInfoList[2].nameArray2"> | |
| 225 | + <image src="../../static/detail-tabicon.png" ></image> | |
| 226 | + </picker> | |
| 227 | + </view> | |
| 228 | + </view> | |
| 229 | + <view class="picker" > | |
| 230 | + <view class="picker-choice"> | |
| 231 | + <view class="choice-left"> | |
| 232 | + <text class="p11">{{pickerInfoList[3].nameC}}</text> | |
| 233 | + <text class="p12">{{pickerInfoList[3].nameE}}</text> | |
| 234 | + </view> | |
| 235 | + <text class="p13">左 (OD)</text> | |
| 236 | + <text class="p14">{{pickerInfoList[3].nameArray1[pickerInfoList[3].nameIndex1]}}</text> | |
| 237 | + <picker @change="bindPickerChange31" :value="pickerInfoList[3].nameIndex1" :range="pickerInfoList[3].nameArray1"> | |
| 238 | + <image src="../../static/detail-tabicon.png" ></image> | |
| 239 | + </picker> | |
| 240 | + <text class="p13">右 (OS)</text> | |
| 241 | + <text class="p14">{{pickerInfoList[3].nameArray2[pickerInfoList[3].nameIndex2]}}</text> | |
| 242 | + <picker @change="bindPickerChange32" :value="pickerInfoList[3].nameIndex2" :range="pickerInfoList[3].nameArray2"> | |
| 243 | + <image src="../../static/detail-tabicon.png" ></image> | |
| 244 | + </picker> | |
| 245 | + </view> | |
| 246 | + </view> | |
| 247 | + <view class="picker" > | |
| 248 | + <view class="picker-choice"> | |
| 249 | + <view class="choice-left"> | |
| 250 | + <text class="p11">{{pickerInfoList[4].nameC}}</text> | |
| 251 | + </view> | |
| 252 | + <text class="p13-date">年 (Y)</text> | |
| 253 | + <text class="p14" style="width: 34px;">{{pickerInfoList[4].nameArray1[pickerInfoList[4].nameIndex1]}}</text> | |
| 254 | + <picker @change="bindPickerChange41" :value="pickerInfoList[4].nameIndex1" :range="pickerInfoList[4].nameArray1"> | |
| 255 | + <image src="../../static/detail-tabicon.png" ></image> | |
| 256 | + </picker> | |
| 257 | + <text class="p13-date">月 (M)</text> | |
| 258 | + <text class="p14" style="width: 30px;">{{pickerInfoList[4].nameArray2[pickerInfoList[4].nameIndex2]}}</text> | |
| 259 | + <picker @change="bindPickerChange42" :value="pickerInfoList[4].nameIndex2" :range="pickerInfoList[4].nameArray2"> | |
| 260 | + <image src="../../static/detail-tabicon.png" ></image> | |
| 261 | + </picker> | |
| 262 | + <text class="p13-date">日 (D)</text> | |
| 263 | + <text class="p14" style="width: 30px;">{{pickerInfoList[4].nameArray3[pickerInfoList[4].nameIndex3]}}</text> | |
| 264 | + <picker @change="bindPickerChange43" :value="pickerInfoList[4].nameIndex3" :range="pickerInfoList[4].nameArray3"> | |
| 265 | + <image src="../../static/detail-tabicon.png" ></image> | |
| 266 | + </picker> | |
| 267 | + </view> | |
| 268 | + </view> | |
| 269 | + <view class="confirm"> | |
| 270 | + <image :src="tablist.confirm ? tabicon[0] : tabicon[1]" @click="changeConfirm"></image> | |
| 271 | + <text>确认以上输入信息来源于我的验光数据!</text> | |
| 272 | + </view> | |
| 273 | + </view> | |
| 274 | + | |
| 275 | + </template> | |
| 276 | + <view class="zhanwei"></view> | |
| 277 | + <view class="button" @click="popSure(details.data.p_name,details.data.p_sale_price)" ><view>立即结算</view></view> | |
| 278 | + </view> | |
| 279 | + <view class="container" v-if="type===4"> | |
| 280 | + <view class="detail"> | |
| 281 | + <view class="detail1"><image v-bind:src="details.data.img_index_url"></image></view> | |
| 282 | + <view class="detail2"> | |
| 283 | + <view class="detail2_name">{{details.data.p_name}}</view> | |
| 284 | + <view class="detail2_tui"><span>支持7天无条件退货</span><span>顺丰发货</span></view> | |
| 285 | + <view class="detail2_price"> | |
| 286 | + <span>¥{{details.data.p_sale_price*count}}</span> | |
| 287 | + <view class="counter"> | |
| 288 | + <view class="btn" disabled="this.disabled" @click="counter(false)">-</view> | |
| 289 | + <text>{{count}}</text> | |
| 290 | + <view class="btn" @click="counter(true)">+</view> | |
| 291 | + </view> | |
| 292 | + </view> | |
| 293 | + </view> | |
| 294 | + </view> | |
| 295 | + <view class="choose"> | |
| 296 | + <view class="colour"> | |
| 297 | + <view class="colour1" @click="xialachange(0)"> | |
| 298 | + <text>框架颜色</text> | |
| 299 | + <image v-bind:src="isNone[0].img"></image> | |
| 300 | + </view> | |
| 301 | + <view class="colour_exp">*{{navData.colour}}</view> | |
| 302 | + <view> | |
| 303 | + <view class="colour2" v-bind:class="{'colour2_none' : isNone[0].state}"> | |
| 304 | + <view | |
| 305 | + v-for="(items,index) in details.data.skuList" | |
| 306 | + :key="index" | |
| 307 | + @click="viewChoose(index)" | |
| 308 | + class="colour2_view" | |
| 309 | + v-bind:class="{'colour2_viewed': chooseNum == index}" | |
| 310 | + > | |
| 311 | + <image v-bind:src="items.pic" @click="colourChange(index,items.sku_name)"></image> | |
| 312 | + </view> | |
| 313 | + </view> | |
| 314 | + </view> | |
| 315 | + <hr/> | |
| 316 | + </view> | |
| 317 | + <view class="size"> | |
| 318 | + <view class="size1" @click="xialachange(1)"> | |
| 319 | + <view class="size1_1">框架尺寸</view> | |
| 320 | + <view><image v-bind:src="isNone[1].img"></image></view> | |
| 321 | + </view> | |
| 322 | + <view class="colour"> | |
| 323 | + <view class="colour_exp">*{{navData.colour}}</view> | |
| 324 | + </view> | |
| 325 | + <view class="D3_list" v-bind:class="{'colour2_none' : isNone[1].state}"> | |
| 326 | + <view> | |
| 327 | + <view><image class="D3_image" v-bind:src ="parameter[0].img"></image></view> | |
| 328 | + <view class="D3_list_jDu"> | |
| 329 | + <view class="D3_list1"> | |
| 330 | + <c-progress class="c-progress" :inner_widthProp="300"/> | |
| 331 | + <text>{{details.data.frame_width}}mm</text> | |
| 332 | + </view> | |
| 333 | + <view>{{parameter[0].standard}}</view> | |
| 334 | + </view> | |
| 335 | + </view> | |
| 336 | + <view> | |
| 337 | + <view><image class="D3_image" v-bind:src ="parameter[1].img"></image></view> | |
| 338 | + <view class="D3_list_jDu"> | |
| 339 | + <view class="D3_list1"> | |
| 340 | + <c-progress class="c-progress" :inner_widthProp="190"/> | |
| 341 | + <view>{{details.data.glass_width}}mm</view> | |
| 342 | + </view> | |
| 343 | + <view>{{parameter[1].standard}}</view> | |
| 344 | + </view> | |
| 345 | + </view> | |
| 346 | + <view> | |
| 347 | + <view><image class="D3_image" v-bind:src ="parameter[2].img"></image></view> | |
| 348 | + <view class="D3_list_jDu"> | |
| 349 | + <view class="D3_list1"> | |
| 350 | + <c-progress class="c-progress" :inner_widthProp="210"/> | |
| 351 | + <view>{{details.data.glass_height}}mm</view> | |
| 352 | + </view> | |
| 353 | + <view>{{parameter[2].standard}}</view> | |
| 354 | + </view> | |
| 355 | + </view> | |
| 356 | + <view> | |
| 357 | + <view><image class="D3_image" v-bind:src ="parameter[3].img"></image></view> | |
| 358 | + <view class="D3_list_jDu"> | |
| 359 | + | |
| 360 | + <view class="D3_list1"> | |
| 361 | + <c-progress class="c-progress" :inner_widthProp="160"/> | |
| 362 | + <view>{{details.data.nose_width}}mm</view> | |
| 363 | + </view> | |
| 364 | + <view>{{parameter[3].standard}}</view> | |
| 365 | + </view> | |
| 366 | + </view> | |
| 367 | + <view> | |
| 368 | + <view><image class="D3_image" v-bind:src ="parameter[4].img"></image></view> | |
| 369 | + <view class="D3_list_jDu"> | |
| 370 | + <view class="D3_list1"> | |
| 371 | + <c-progress class="c-progress" :inner_widthProp="260"/> | |
| 372 | + <view>{{details.data.leg_long}}mm</view> | |
| 373 | + </view> | |
| 374 | + <view>{{parameter[4].standard}}</view> | |
| 375 | + </view> | |
| 376 | + </view> | |
| 377 | + <hr/> | |
| 378 | + </view> | |
| 379 | + </view> | |
| 380 | + <view class="part"> | |
| 381 | + <view class="size1" @click="xialachange(2)"> | |
| 382 | + <view class="size1_1" >配件</view> | |
| 383 | + <view> | |
| 384 | + <span>+¥0.00</span> | |
| 385 | + <image v-bind:src="isNone[2].img"></image> | |
| 386 | + </view> | |
| 142 | 387 | </view> |
| 143 | 388 | <view class="colour_exp">*0290</view> |
| 144 | - <view class="part_som"> | |
| 389 | + <view class="part_som" v-bind:class="{'colour2_none' : isNone[2].state}"> | |
| 145 | 390 | <view |
| 146 | 391 | v-for="(part) in part" |
| 147 | 392 | :key="part.key" |
| ... | ... | @@ -161,8 +406,9 @@ |
| 161 | 406 | </view> |
| 162 | 407 | </view> |
| 163 | 408 | <view class="zhanwei"></view> |
| 164 | - <view class="button"><view>立即结算</view></view> | |
| 409 | + <view class="button"><view @click="popSure(details.data.p_name,details.data.p_sale_price)" >立即结算</view></view> | |
| 165 | 410 | </view> |
| 411 | +</view> | |
| 166 | 412 | </template> |
| 167 | 413 | <script> |
| 168 | 414 | import CProgress from '../../components/UniSliper/UniSliper' |
| ... | ... | @@ -174,10 +420,30 @@ export default { |
| 174 | 420 | }, |
| 175 | 421 | data(){ |
| 176 | 422 | return{ |
| 423 | + type: 2, | |
| 177 | 424 | count: 1, |
| 178 | - colour: '1.56非球面防蓝光_亚黑色', | |
| 179 | 425 | chooseNum : '', |
| 180 | 426 | isSplit: '' , |
| 427 | + isNone:[ | |
| 428 | + {state: false ,img: '/static/img/detail/xiala.png'}, | |
| 429 | + {state: false ,img: '/static/img/detail/xiala.png'}, | |
| 430 | + {state: false ,img: '/static/img/detail/xiala.png'}, | |
| 431 | + {state: false ,img: '/static/img/detail/xiala.png'}, | |
| 432 | + {state: false ,img: '/static/img/detail/xiala.png'}, | |
| 433 | + ], | |
| 434 | + | |
| 435 | + //传参 | |
| 436 | + navData:{ | |
| 437 | + pid: "26", | |
| 438 | + p_root_index: "4", | |
| 439 | + name:'', | |
| 440 | + price:'', | |
| 441 | + type:'', | |
| 442 | + split: '1.56非球面防蓝光', | |
| 443 | + colour: '1.56非球面防蓝光_亚黑色', | |
| 444 | + }, | |
| 445 | + | |
| 446 | + //尺寸 | |
| 181 | 447 | parameter:[ |
| 182 | 448 | {key: 0,img:'/static/img/detail/d2.png', standard:'框架宽', slength:139}, |
| 183 | 449 | {key: 1,img:'/static/img/detail/d3.png', standard:'镜片宽', slength:51}, |
| ... | ... | @@ -205,15 +471,21 @@ export default { |
| 205 | 471 | {key: 6,img:'/static/img/detail/Kuang/g3.png',is_actived:false}, |
| 206 | 472 | {key: 7,img:'/static/img/detail/Kuang/g2.png',is_actived:false}, |
| 207 | 473 | ], |
| 208 | - //折射率 | |
| 209 | - split:[ | |
| 210 | - {number: 1.56}, | |
| 211 | - {number: 1.60}, | |
| 212 | - {number: 1.67}, | |
| 213 | - {number: 1.71}, | |
| 214 | - {number: 1.74} | |
| 215 | - | |
| 216 | - ] | |
| 474 | + opIsOpen:true, | |
| 475 | + tablist: { | |
| 476 | + // read: true, | |
| 477 | + // seeLong: false, | |
| 478 | + confirm: false | |
| 479 | + }, | |
| 480 | + tabicon:['/static/detail-button.png','/static/detail-button-unselected.png'], | |
| 481 | + // 度数相关数据 | |
| 482 | + pickerInfoList:[ | |
| 483 | + {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}, | |
| 484 | + {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}, | |
| 485 | + {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}, | |
| 486 | + {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}, | |
| 487 | + {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} | |
| 488 | + ], | |
| 217 | 489 | } |
| 218 | 490 | }, |
| 219 | 491 | |
| ... | ... | @@ -225,10 +497,9 @@ export default { |
| 225 | 497 | onLoad:function(){ |
| 226 | 498 | store.dispatch('detailStandard_k/fetch', { |
| 227 | 499 | uid: "1", |
| 228 | - pid: "26", | |
| 229 | - }); | |
| 230 | - console.log(this.$store.state.detailStandard_k.list.data+'ssswwwwwwwws'); | |
| 231 | - console.log("ssssssssssssssssssssssssssss") | |
| 500 | + pid: "26", | |
| 501 | + p_root_index: "4" | |
| 502 | + }); | |
| 232 | 503 | }, |
| 233 | 504 | methods: { |
| 234 | 505 | counter(isadd){ |
| ... | ... | @@ -238,17 +509,27 @@ export default { |
| 238 | 509 | this.count <= 1? this.disabled = true:this.count-- |
| 239 | 510 | } |
| 240 | 511 | }, |
| 512 | + xialachange(index){ | |
| 513 | + this.isNone[index].state = !this.isNone[index].state; | |
| 514 | + if(this.isNone[index].state){ | |
| 515 | + this.isNone[index].img = '/static/img/detail/right.png' | |
| 516 | + }else{ | |
| 517 | + this.isNone[index].img = '/static/img/detail/xiala.png' | |
| 518 | + } | |
| 519 | + }, | |
| 241 | 520 | colourChange(index,e){ |
| 242 | - this.colour = e ; //颜色选择 | |
| 243 | - // console.log(index,e); | |
| 521 | + this.navData.colour = e ; //颜色选择 | |
| 244 | 522 | |
| 245 | 523 | }, |
| 246 | 524 | viewChoose(index){ |
| 247 | 525 | this.chooseNum = index |
| 248 | 526 | }, |
| 249 | - splitChoose(index){ | |
| 527 | + //折射率选择 | |
| 528 | + splitChoose(index,e){ | |
| 250 | 529 | this.isSplit = index |
| 530 | + this.navData.split = e | |
| 251 | 531 | }, |
| 532 | + //跳转镜片选购页 | |
| 252 | 533 | popArgs(){ |
| 253 | 534 | uni.navigateTo({ |
| 254 | 535 | url: '../detailsChoiceArgs/detailsChoiceArgs', |
| ... | ... | @@ -256,7 +537,59 @@ export default { |
| 256 | 537 | fail: () => {}, |
| 257 | 538 | complete: () => {} |
| 258 | 539 | }); |
| 259 | - } | |
| 540 | + }, | |
| 541 | + //跳转确认订单页及传参 | |
| 542 | + popSure(name,price){ | |
| 543 | + this.navData.name = name; | |
| 544 | + this.navData.price = price; | |
| 545 | + this.navData.type = this.type; | |
| 546 | + var navData = JSON.stringify(this.navData); | |
| 547 | + uni.navigateTo({ | |
| 548 | + url: '../confirmOrder/confirmOrder?index='+navData, | |
| 549 | + }); | |
| 550 | + console.log(this.navData) | |
| 551 | + }, | |
| 552 | + //验光表 | |
| 553 | + changeConfirm() { | |
| 554 | + this.tablist.confirm = !this.tablist.confirm | |
| 555 | + }, | |
| 556 | + bindPickerChange01: function(e) { | |
| 557 | + this.pickerInfoList[0].nameIndex1 = e.target.value | |
| 558 | + }, | |
| 559 | + bindPickerChange02: function(e) { | |
| 560 | + this.pickerInfoList[0].nameIndex2 = e.target.value | |
| 561 | + }, | |
| 562 | + | |
| 563 | + bindPickerChange11: function(e) { | |
| 564 | + this.pickerInfoList[1].nameIndex1 = e.target.value | |
| 565 | + }, | |
| 566 | + bindPickerChange12: function(e) { | |
| 567 | + this.pickerInfoList[1].nameIndex2 = e.target.value | |
| 568 | + }, | |
| 569 | + | |
| 570 | + bindPickerChange21: function(e) { | |
| 571 | + this.pickerInfoList[2].nameIndex1 = e.target.value | |
| 572 | + }, | |
| 573 | + bindPickerChange22: function(e) { | |
| 574 | + this.pickerInfoList[2].nameIndex2 = e.target.value | |
| 575 | + }, | |
| 576 | + | |
| 577 | + bindPickerChange31: function(e) { | |
| 578 | + this.pickerInfoList[3].nameIndex1 = e.target.value | |
| 579 | + }, | |
| 580 | + bindPickerChange32: function(e) { | |
| 581 | + this.pickerInfoList[3].nameIndex2 = e.target.value | |
| 582 | + }, | |
| 583 | + | |
| 584 | + bindPickerChange41: function(e) { | |
| 585 | + this.pickerInfoList[4].nameIndex1 = e.target.value | |
| 586 | + }, | |
| 587 | + bindPickerChange42: function(e) { | |
| 588 | + this.pickerInfoList[4].nameIndex2 = e.target.value | |
| 589 | + }, | |
| 590 | + bindPickerChange43: function(e) { | |
| 591 | + this.pickerInfoList[4].nameIndex3 = e.target.value | |
| 592 | + }, | |
| 260 | 593 | } |
| 261 | 594 | |
| 262 | 595 | } |
| ... | ... | @@ -402,6 +735,9 @@ hr{ |
| 402 | 735 | } |
| 403 | 736 | } |
| 404 | 737 | } |
| 738 | + .colour2_none{ | |
| 739 | + display: none; | |
| 740 | + } | |
| 405 | 741 | } |
| 406 | 742 | .jp_colour2{ |
| 407 | 743 | display: grid; |
| ... | ... | @@ -548,6 +884,9 @@ hr{ |
| 548 | 884 | } |
| 549 | 885 | } |
| 550 | 886 | } |
| 887 | + .colour2_none{ | |
| 888 | + display: none; | |
| 889 | + } | |
| 551 | 890 | } |
| 552 | 891 | |
| 553 | 892 | .buy{ |
| ... | ... | @@ -557,7 +896,7 @@ hr{ |
| 557 | 896 | border-radius: 8px; |
| 558 | 897 | padding-top: 20px; |
| 559 | 898 | box-sizing: border-box; |
| 560 | - margin-bottom: 20px; | |
| 899 | + margin-bottom: 10px; | |
| 561 | 900 | } |
| 562 | 901 | .buy1{ |
| 563 | 902 | font-family: PingFangSC-Medium; |
| ... | ... | @@ -599,7 +938,107 @@ hr{ |
| 599 | 938 | } |
| 600 | 939 | .zhanwei{ |
| 601 | 940 | background: #F2F2F2; |
| 602 | - height: 120rpx; | |
| 941 | + height: 200rpx; | |
| 942 | +} | |
| 943 | +.goods-form { | |
| 944 | + display: flex; | |
| 945 | + flex-direction: column; | |
| 946 | + align-items: center; | |
| 947 | + justify-content: center; | |
| 948 | + background-color: #fff; | |
| 949 | + width: 100%; | |
| 950 | + padding-top:20px; | |
| 951 | + padding-bottom:20px; | |
| 952 | + box-sizing: border-box; | |
| 953 | + | |
| 954 | + .p1 { | |
| 955 | + font-size: 16px; | |
| 956 | + color: #333333; | |
| 957 | + letter-spacing: -0.3px; | |
| 958 | + text-align: justify; | |
| 959 | + line-height: 24px; | |
| 960 | + margin: 4px 0; | |
| 961 | + } | |
| 962 | + .p2 { | |
| 963 | + font-size: 12px; | |
| 964 | + color: #999999; | |
| 965 | + letter-spacing: -0.23px; | |
| 966 | + margin-bottom: 18rpx; | |
| 967 | + } | |
| 968 | + image{ | |
| 969 | + width: 28rpx; | |
| 970 | + height: 26rpx; | |
| 971 | + } | |
| 972 | + .confirm { | |
| 973 | + display: flex; | |
| 974 | + align-items: center; | |
| 975 | + font-size: 12px; | |
| 976 | + color: #666666; | |
| 977 | + letter-spacing: -0.23px; | |
| 978 | + width: 684rpx; | |
| 979 | + image{ | |
| 980 | + margin-right:25rpx; | |
| 981 | + } | |
| 982 | + } | |
| 983 | + .picker{ | |
| 984 | + display: flex; | |
| 985 | + flex-direction: column; | |
| 986 | + justify-content: center; | |
| 987 | + align-items: center; | |
| 988 | + width: 100%; | |
| 989 | + image{ | |
| 990 | + width: 10px; | |
| 991 | + height: 10px; | |
| 992 | + margin-right: 5px; | |
| 993 | + } | |
| 994 | + .picker-choice{ | |
| 995 | + display: flex; | |
| 996 | + width: 684rpx; | |
| 997 | + align-items: center; | |
| 998 | + margin-bottom: 40rpx; | |
| 999 | + .choice-left{ | |
| 1000 | + width: 210rpx; | |
| 1001 | + .p11 { | |
| 1002 | + font-size: 14px; | |
| 1003 | + color: #333333; | |
| 1004 | + letter-spacing: -0.26px; | |
| 1005 | + text-align: justify; | |
| 1006 | + line-height: 24px; | |
| 1007 | + // margin-right: 10px; | |
| 1008 | + } | |
| 1009 | + .p12 { | |
| 1010 | + font-size: 10px; | |
| 1011 | + color: #3F3F3F; | |
| 1012 | + letter-spacing: -0.19px; | |
| 1013 | + text-align: justify; | |
| 1014 | + line-height: 24px; | |
| 1015 | + } | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + } | |
| 1019 | + .p13 { | |
| 1020 | + font-size: 10px; | |
| 1021 | + color: #999999; | |
| 1022 | + letter-spacing: -0.19px; | |
| 1023 | + margin-right: 10px; | |
| 1024 | + } | |
| 1025 | + .p13-date { | |
| 1026 | + font-size: 10px; | |
| 1027 | + color: #999999; | |
| 1028 | + letter-spacing: -0.19px; | |
| 1029 | + margin-right: 5px; | |
| 1030 | + } | |
| 1031 | + .p14 { | |
| 1032 | + font-size: 14px; | |
| 1033 | + color: #666666; | |
| 1034 | + letter-spacing: -0.26px; | |
| 1035 | + text-align: center; | |
| 1036 | + width: 124rpx; | |
| 1037 | + border-bottom: 1px solid #CFCFCF; | |
| 1038 | + } | |
| 1039 | + | |
| 1040 | + } | |
| 1041 | + } | |
| 603 | 1042 | } |
| 604 | 1043 | .button{ |
| 605 | 1044 | position: fixed; | ... | ... |
src/pages/newOpticsData/newOpticsData.vue
| ... | ... | @@ -8,6 +8,16 @@ |
| 8 | 8 | 填写验光数据 |
| 9 | 9 | </view> |
| 10 | 10 | <text class="p2">没有验光数据?请到线下眼镜店验光哦~</text> |
| 11 | + <view class="use_name"> | |
| 12 | + <text>验光单取名:</text> | |
| 13 | + <input type="text" @change="handleInput" | |
| 14 | + placeholder="请输入名称" maxlength="30" :value="name" /> | |
| 15 | + </view> | |
| 16 | + <view class="use_pd"> | |
| 17 | + <text>瞳距:</text> | |
| 18 | + <input type="number" @change="handleInputPd" | |
| 19 | + placeholder="请输入瞳距,单位cm" maxlength="20" :value="pd" /> | |
| 20 | + </view> | |
| 11 | 21 | <view class="picker" > |
| 12 | 22 | <view class="picker-choice"> |
| 13 | 23 | <view class="choice-left"> |
| ... | ... | @@ -62,7 +72,7 @@ |
| 62 | 72 | </picker> |
| 63 | 73 | </view> |
| 64 | 74 | </view> |
| 65 | - <view class="picker" > | |
| 75 | +<!-- <view class="picker" > | |
| 66 | 76 | <view class="picker-choice"> |
| 67 | 77 | <view class="choice-left"> |
| 68 | 78 | <text class="p11">{{pickerInfoList[3].nameC}}</text> |
| ... | ... | @@ -79,31 +89,31 @@ |
| 79 | 89 | <image src="../../static/detail-tabicon.png" ></image> |
| 80 | 90 | </picker> |
| 81 | 91 | </view> |
| 82 | - </view> | |
| 92 | + </view> --> | |
| 83 | 93 | <view class="picker" > |
| 84 | 94 | <view class="picker-choice"> |
| 85 | 95 | <view class="choice-left"> |
| 86 | - <text class="p11">{{pickerInfoList[4].nameC}}</text> | |
| 96 | + <text class="p11">{{pickerInfoList[3].nameC}}</text> | |
| 87 | 97 | </view> |
| 88 | 98 | <text class="p13-date">年 (Y)</text> |
| 89 | - <text class="p14" style="width: 34px;">{{pickerInfoList[4].nameArray1[pickerInfoList[4].nameIndex1]}}</text> | |
| 90 | - <picker @change="bindPickerChange41" :value="pickerInfoList[4].nameIndex1" :range="pickerInfoList[4].nameArray1"> | |
| 99 | + <text class="p14" style="width: 34px;">{{pickerInfoList[3].nameArray1[pickerInfoList[3].nameIndex1]}}</text> | |
| 100 | + <picker @change="bindPickerChange41" :value="pickerInfoList[3].nameIndex1" :range="pickerInfoList[3].nameArray1"> | |
| 91 | 101 | <image src="../../static/detail-tabicon.png" ></image> |
| 92 | 102 | </picker> |
| 93 | 103 | <text class="p13-date">月 (M)</text> |
| 94 | - <text class="p14" style="width: 30px;">{{pickerInfoList[4].nameArray2[pickerInfoList[4].nameIndex2]}}</text> | |
| 95 | - <picker @change="bindPickerChange42" :value="pickerInfoList[4].nameIndex2" :range="pickerInfoList[4].nameArray2"> | |
| 104 | + <text class="p14" style="width: 30px;">{{pickerInfoList[3].nameArray2[pickerInfoList[3].nameIndex2]}}</text> | |
| 105 | + <picker @change="bindPickerChange42" :value="pickerInfoList[3].nameIndex2" :range="pickerInfoList[3].nameArray2"> | |
| 96 | 106 | <image src="../../static/detail-tabicon.png" ></image> |
| 97 | 107 | </picker> |
| 98 | 108 | <text class="p13-date">日 (D)</text> |
| 99 | - <text class="p14" style="width: 30px;">{{pickerInfoList[4].nameArray3[pickerInfoList[4].nameIndex3]}}</text> | |
| 100 | - <picker @change="bindPickerChange43" :value="pickerInfoList[4].nameIndex3" :range="pickerInfoList[4].nameArray3"> | |
| 109 | + <text class="p14" style="width: 30px;">{{pickerInfoList[3].nameArray3[pickerInfoList[3].nameIndex3]}}</text> | |
| 110 | + <picker @change="bindPickerChange43" :value="pickerInfoList[3].nameIndex3" :range="pickerInfoList[3].nameArray3"> | |
| 101 | 111 | <image src="../../static/detail-tabicon.png" ></image> |
| 102 | 112 | </picker> |
| 103 | 113 | </view> |
| 104 | 114 | </view> |
| 105 | 115 | <view class="confirm"> |
| 106 | - <image :src="tablist.confirm ? tabicon[0] : tabicon[1]" @click="changeConfirm"></image> | |
| 116 | + <image :src="confirm ? tabicon[0] : tabicon[1]" @click="changeConfirm"></image> | |
| 107 | 117 | <text>确认以上输入信息来源于我的验光数据!</text> |
| 108 | 118 | </view> |
| 109 | 119 | </view> |
| ... | ... | @@ -112,72 +122,261 @@ |
| 112 | 122 | </view> |
| 113 | 123 | |
| 114 | 124 | |
| 115 | - <view class="footer"> | |
| 125 | + <view class="footer" @click="handleSubmit"> | |
| 116 | 126 | <button class="btn" type="default">提 交</button> |
| 117 | 127 | </view> |
| 118 | 128 | </view> |
| 119 | 129 | </template> |
| 120 | 130 | |
| 121 | -<script> | |
| 131 | +<script> | |
| 132 | + import store from '@/store'; | |
| 133 | + | |
| 122 | 134 | export default { |
| 123 | 135 | data() { |
| 124 | 136 | return { |
| 125 | 137 | pickerInfoList:[ |
| 126 | - {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}, | |
| 127 | - {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}, | |
| 128 | - {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}, | |
| 129 | - {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}, | |
| 130 | - {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} | |
| 138 | + {nameC:"度数",nameE:"(SPH)",nameArray1:[''],nameIndex1:0,nameArray2:[''],nameIndex2:0,key:0}, | |
| 139 | + {nameC:"散光",nameE:"(CYL)",nameArray1:[''],nameIndex1:0,nameArray2:[''],nameIndex2:0,key:1}, | |
| 140 | + {nameC:"散光轴位",nameE:"(AXI)",nameArray1:[''],nameIndex1:0,nameArray2:[''],nameIndex2:0,key:2}, | |
| 141 | + {nameC:"验光日期",nameE:'',nameArray1:[''],nameIndex1:0,nameArray2:['',1,2,3,4,5,6,7,8,9,10,11,12],nameIndex2:0,nameArray3:[''],nameIndex3:0} | |
| 131 | 142 | ], |
| 132 | - tablist: { | |
| 133 | - // read: true, | |
| 134 | - // seeLong: false, | |
| 135 | - confirm: false | |
| 143 | + confirm: false, // 用户是否确认 | |
| 144 | + tabicon:['/static/detail-button.png','/static/detail-button-unselected.png'], | |
| 145 | + name: '夏小花', | |
| 146 | + pickerInfoChioce:{ | |
| 147 | + "leftSph": 0, | |
| 148 | + "rightSph": 0, | |
| 149 | + "leftCyl": 0, | |
| 150 | + "rightCyl": 0, | |
| 151 | + "leftAxi": 0, | |
| 152 | + "rightAxi": 0, | |
| 153 | + "time":{ | |
| 154 | + "year":0, | |
| 155 | + "month": 0, | |
| 156 | + "day":0 , | |
| 157 | + } | |
| 136 | 158 | }, |
| 137 | - tabicon:['/static/detail-button.png','/static/detail-button-unselected.png'], | |
| 159 | + pd: '',// 瞳距 | |
| 160 | + kinds:Number, // kinds=1,提交为新增验光,2为修改 | |
| 161 | + mp_id: Number | |
| 138 | 162 | }; |
| 139 | 163 | }, |
| 164 | + onLoad: function (option) { | |
| 165 | + //option为object类型,会序列化上个页面传递的参数 | |
| 166 | + // 初始化SPL、CYL、AXI的值 | |
| 167 | + for (let j = 0; j < 3; j++) { | |
| 168 | + for(let i=-12;i<6;i++){ | |
| 169 | + this.pickerInfoList[j].nameArray1.push(i) | |
| 170 | + this.pickerInfoList[j].nameArray1.push(i+0.5) | |
| 171 | + this.pickerInfoList[j].nameArray2.push(i) | |
| 172 | + this.pickerInfoList[j].nameArray2.push(i+0.5) | |
| 173 | + if(i>=-6){ | |
| 174 | + this.pickerInfoList[j].nameArray1.push(i+0.25) | |
| 175 | + this.pickerInfoList[j].nameArray1.push(i+0.75) | |
| 176 | + this.pickerInfoList[j].nameArray2.push(i+0.25) | |
| 177 | + this.pickerInfoList[j].nameArray2.push(i+0.75) | |
| 178 | + } | |
| 179 | + if(i==5){ | |
| 180 | + this.pickerInfoList[j].nameArray1.push(i+1) | |
| 181 | + this.pickerInfoList[j].nameArray2.push(i+1) | |
| 182 | + } | |
| 183 | + } | |
| 184 | + } | |
| 185 | + // 初始化日期值 | |
| 186 | + for (let i = 1; i < 32; i++){ | |
| 187 | + this.pickerInfoList[3].nameArray3.push(i) | |
| 188 | + } | |
| 189 | + // 初始化年份前后五年 | |
| 190 | + let myDate = new Date(); | |
| 191 | + let nowYear = myDate.getFullYear(); | |
| 192 | + for(let i=0;i<5;i++){ | |
| 193 | + this.pickerInfoList[3].nameArray1.push(nowYear-i) | |
| 194 | + } | |
| 195 | + | |
| 196 | + this.kinds=option.kinds | |
| 197 | + if(option.kinds==1){ | |
| 198 | + this.name= ''; | |
| 199 | + this.pd= ''; | |
| 200 | + } else{ | |
| 201 | + console.log('args===>',option.index) | |
| 202 | + const loveList=Object.assign({},this.$store.state.myLoveList.loveList) | |
| 203 | + console.log('args===>',loveList[option.index].in_time) | |
| 204 | + console.log('args===>',loveList[option.index].in_time.toString().slice(0,4)) | |
| 205 | + console.log('args===>',loveList[option.index].in_time.toString().slice(5,6)==0) | |
| 206 | + console.log('args===>',loveList[option.index].in_time.toString().slice(8,10)) | |
| 207 | + this.name=loveList[option.index].name | |
| 208 | + this.pd=loveList[option.index].pd | |
| 209 | + this.mp_id=loveList[option.index].mp_id | |
| 210 | + // 将kinds =2时的值传到该页面 | |
| 211 | + this.pickerInfoList[0].nameArray1.unshift(loveList[option.index].leftSph) | |
| 212 | + this.pickerInfoList[0].nameArray2.unshift(loveList[option.index].rightSph) | |
| 213 | + this.pickerInfoList[1].nameArray1.unshift(loveList[option.index].leftCyl) | |
| 214 | + this.pickerInfoList[1].nameArray2.unshift(loveList[option.index].rightCyl) | |
| 215 | + this.pickerInfoList[2].nameArray1.unshift(loveList[option.index].leftAxi) | |
| 216 | + this.pickerInfoList[2].nameArray2.unshift(loveList[option.index].rightAxi) | |
| 217 | + | |
| 218 | + this.pickerInfoList[3].nameArray1.unshift(loveList[option.index].in_time.toString().slice(0,4)) | |
| 219 | + if(loveList[option.index].in_time.toString().slice(5,6)==0){ | |
| 220 | + this.pickerInfoList[3].nameArray2.unshift(loveList[option.index].in_time.toString().slice(6,7)) | |
| 221 | + } else{ | |
| 222 | + this.pickerInfoList[3].nameArray2.unshift(loveList[option.index].in_time.toString().slice(5,7)) | |
| 223 | + } | |
| 224 | + if(loveList[option.index].in_time.toString().slice(8,9)==0){ | |
| 225 | + this.pickerInfoList[3].nameArray3.unshift(loveList[option.index].in_time.toString().slice(9,10)) | |
| 226 | + } else{ | |
| 227 | + this.pickerInfoList[3].nameArray3.unshift(loveList[option.index].in_time.toString().slice(8,10)) | |
| 228 | + } | |
| 229 | + } | |
| 230 | + }, | |
| 140 | 231 | methods:{ |
| 232 | + handleInput(e){ | |
| 233 | + this.name=e.target.value | |
| 234 | + }, | |
| 235 | + handleInputPd(e){ | |
| 236 | + // 只能输入正浮点数或正数 | |
| 237 | + if(/^\d+(\.\d+)?$/.test(e.target.value)){ | |
| 238 | + this.pd=e.target.value | |
| 239 | + } else { | |
| 240 | + uni.showToast({ | |
| 241 | + title:"请输入有效数据;示例:89", | |
| 242 | + icon: "none", | |
| 243 | + duration: 3000, | |
| 244 | + }) | |
| 245 | + this.pd = '' | |
| 246 | + } | |
| 247 | + | |
| 248 | + }, | |
| 249 | + // 用户提交 | |
| 250 | + handleSubmit(){ | |
| 251 | + if(this.name==''){ | |
| 252 | + uni.showToast({ | |
| 253 | + title:"请输入验光单取名", | |
| 254 | + icon: "none", | |
| 255 | + duration: 3000, | |
| 256 | + }) | |
| 257 | + } | |
| 258 | + if(this.pd==''){ | |
| 259 | + uni.showToast({ | |
| 260 | + title:"请输入瞳距", | |
| 261 | + icon: "none", | |
| 262 | + duration: 3000, | |
| 263 | + }) | |
| 264 | + } | |
| 265 | + if(this.confirm){ | |
| 266 | + if(this.kinds==1){ | |
| 267 | + // 添加用户验光单 | |
| 268 | + console.log('kinds====>',this.kinds) | |
| 269 | + store.dispatch('myLoveList/addMylove', { | |
| 270 | + | |
| 271 | + uid: this.$store.state.user.userInfo.uid, | |
| 272 | + openid: this.$store.state.user.userInfo.openid, | |
| 273 | + // mp_name: this.$store.state.user.userInfo.mp_name, | |
| 274 | + leftSph: this.pickerInfoChioce.leftSph, | |
| 275 | + rightSph: this.pickerInfoChioce.rightSph, | |
| 276 | + leftCyl: this.pickerInfoChioce.leftCyl, | |
| 277 | + rightCyl: this.pickerInfoChioce.rightCyl, | |
| 278 | + leftAxi: this.pickerInfoChioce.leftAxi, | |
| 279 | + rightAxi: this.pickerInfoChioce.rightAxi, | |
| 280 | + pd: this.pd,// 瞳距 | |
| 281 | + mp_name:this.name, | |
| 282 | + // time: this.pickerInfoChioce.time, | |
| 283 | + // img_url2: "http://localhost:8087/images/shop_1/1/", | |
| 284 | + }); | |
| 285 | + store.dispatch('myLoveList/getLoveList', { | |
| 286 | + uid: this.$store.state.user.userInfo.uid, | |
| 287 | + }); | |
| 288 | + uni.navigateBack({ | |
| 289 | + delta:1, | |
| 290 | + animationDuration:2000 | |
| 291 | + }) | |
| 292 | + } | |
| 293 | + if(this.kinds==2){ | |
| 294 | + // console.log('kinds====>',this.kinds) | |
| 295 | + // console.log('pickerindex=====>',this.pickerInfoList[0].nameIndex1) | |
| 296 | + // console.log('this.pickerInfoChioce====>',type(this.pickerInfoChioce)) | |
| 297 | + const leftList = ["leftSph","leftCyl","leftAxi"]; | |
| 298 | + const rightList = ["rightSph", "rightCyl", "rigthAxi"]; | |
| 299 | + for (let j=0; j<3; j++) { | |
| 300 | + if(this.pickerInfoList[j].nameIndex1!=0){ | |
| 301 | + | |
| 302 | + store.dispatch('myLoveList/updateMylove', { | |
| 303 | + uid: this.$store.state.user.userInfo.uid, | |
| 304 | + openid: this.$store.state.user.userInfo.openid, | |
| 305 | + mp_id: this.mp_id, | |
| 306 | + keyname: leftList[j], | |
| 307 | + keyvalue: this.pickerInfoList[j].nameArray1[this.pickerInfoList[j].nameIndex1], | |
| 308 | + }); | |
| 309 | + } | |
| 310 | + if(this.pickerInfoList[j].nameIndex2 !=0) { | |
| 311 | + store.dispatch('myLoveList/updateMylove', { | |
| 312 | + uid: this.$store.state.user.userInfo.uid, | |
| 313 | + openid: this.$store.state.user.userInfo.openid, | |
| 314 | + mp_id: this.mp_id, | |
| 315 | + keyname: rightList[j], | |
| 316 | + keyvalue: this.pickerInfoList[j].nameArray2[this.pickerInfoList[j].nameIndex2] | |
| 317 | + }); | |
| 318 | + } | |
| 319 | + } | |
| 320 | + store.dispatch('myLoveList/getLoveList', { | |
| 321 | + uid: this.$store.state.user.userInfo.uid, | |
| 322 | + }); | |
| 323 | + uni.navigateBack({ | |
| 324 | + delta:1, | |
| 325 | + animationDuration:2000 | |
| 326 | + }) | |
| 327 | + | |
| 328 | + } | |
| 329 | + | |
| 330 | + } else{ | |
| 331 | + uni.showToast({ | |
| 332 | + title:"请确认你的验光数据", | |
| 333 | + icon: "none", | |
| 334 | + duration: 3000, | |
| 335 | + }) | |
| 336 | + } | |
| 337 | + }, | |
| 141 | 338 | changeConfirm() { |
| 142 | - this.tablist.confirm = !this.tablist.confirm | |
| 339 | + this.confirm = !this.confirm | |
| 143 | 340 | }, |
| 144 | 341 | |
| 145 | 342 | bindPickerChange01: function(e) { |
| 146 | 343 | this.pickerInfoList[0].nameIndex1 = e.target.value |
| 344 | + this.pickerInfoChioce.leftSph=this.pickerInfoList[0].nameArray1[e.target.value] | |
| 147 | 345 | }, |
| 148 | 346 | bindPickerChange02: function(e) { |
| 149 | 347 | this.pickerInfoList[0].nameIndex2 = e.target.value |
| 348 | + this.pickerInfoChioce.rightSph=this.pickerInfoList[0].nameArray2[e.target.value] | |
| 150 | 349 | }, |
| 151 | 350 | |
| 152 | 351 | bindPickerChange11: function(e) { |
| 153 | 352 | this.pickerInfoList[1].nameIndex1 = e.target.value |
| 353 | + this.pickerInfoChioce.leftCyl=this.pickerInfoList[1].nameArray1[e.target.value] | |
| 154 | 354 | }, |
| 155 | 355 | bindPickerChange12: function(e) { |
| 156 | 356 | this.pickerInfoList[1].nameIndex2 = e.target.value |
| 357 | + this.pickerInfoChioce.rightCyl=this.pickerInfoList[1].nameArray2[e.target.value] | |
| 157 | 358 | }, |
| 158 | 359 | |
| 159 | 360 | bindPickerChange21: function(e) { |
| 160 | 361 | this.pickerInfoList[2].nameIndex1 = e.target.value |
| 362 | + this.pickerInfoChioce.leftAxi=this.pickerInfoList[2].nameArray1[e.target.value] | |
| 161 | 363 | }, |
| 162 | 364 | bindPickerChange22: function(e) { |
| 163 | - this.pickerInfoList[2].nameIndex2 = e.target.value | |
| 365 | + this.pickerInfoList[2].nameIndex2 = e.target.value | |
| 366 | + this.pickerInfoChioce.rightAxi=this.pickerInfoList[2].nameArray2[e.target.value] | |
| 164 | 367 | }, |
| 165 | 368 | |
| 166 | - bindPickerChange31: function(e) { | |
| 167 | - this.pickerInfoList[3].nameIndex1 = e.target.value | |
| 168 | - }, | |
| 169 | - bindPickerChange32: function(e) { | |
| 170 | - this.pickerInfoList[3].nameIndex2 = e.target.value | |
| 171 | - }, | |
| 172 | - | |
| 173 | 369 | bindPickerChange41: function(e) { |
| 174 | - this.pickerInfoList[4].nameIndex1 = e.target.value | |
| 370 | + this.pickerInfoList[3].nameIndex1 = e.target.value | |
| 371 | + this.pickerInfoChioce.time.year=this.pickerInfoList[3].nameArray1[e.target.value] | |
| 175 | 372 | }, |
| 176 | 373 | bindPickerChange42: function(e) { |
| 177 | - this.pickerInfoList[4].nameIndex2 = e.target.value | |
| 374 | + this.pickerInfoList[3].nameIndex2 = e.target.value | |
| 375 | + this.pickerInfoChioce.time.month=this.pickerInfoList[3].nameArray2[e.target.value] | |
| 178 | 376 | }, |
| 179 | 377 | bindPickerChange43: function(e) { |
| 180 | - this.pickerInfoList[4].nameIndex3 = e.target.value | |
| 378 | + this.pickerInfoList[3].nameIndex3 = e.target.value | |
| 379 | + this.pickerInfoChioce.time.day=this.pickerInfoList[3].nameArray3[e.target.value] | |
| 181 | 380 | }, |
| 182 | 381 | } |
| 183 | 382 | } |
| ... | ... | @@ -237,6 +436,36 @@ |
| 237 | 436 | letter-spacing: -0.23px; |
| 238 | 437 | margin-bottom: 18rpx; |
| 239 | 438 | } |
| 439 | + .use_pd{ | |
| 440 | + display: flex; | |
| 441 | + height: 48rpx; | |
| 442 | + line-height: 48rpx; | |
| 443 | + margin-left: -298rpx; | |
| 444 | + margin-top: 30rpx; | |
| 445 | + margin-bottom: 40rpx; | |
| 446 | + align-items: center; | |
| 447 | + justify-content: center; | |
| 448 | + text{ | |
| 449 | + font-size: 14px; | |
| 450 | + color: #333333; | |
| 451 | + margin-right: 44rpx; | |
| 452 | + } | |
| 453 | + } | |
| 454 | + .use_name{ | |
| 455 | + display: flex; | |
| 456 | + height: 48rpx; | |
| 457 | + line-height: 48rpx; | |
| 458 | + margin-left: -220rpx; | |
| 459 | + margin-top: 20rpx; | |
| 460 | + align-items: center; | |
| 461 | + justify-content: center; | |
| 462 | + // text-align: center; | |
| 463 | + text{ | |
| 464 | + font-size: 14px; | |
| 465 | + color: #333333; | |
| 466 | + margin-right: 44rpx; | |
| 467 | + } | |
| 468 | + } | |
| 240 | 469 | image{ |
| 241 | 470 | width: 28rpx; |
| 242 | 471 | height: 26rpx; |
| ... | ... | @@ -307,6 +536,8 @@ |
| 307 | 536 | text-align: center; |
| 308 | 537 | width: 124rpx; |
| 309 | 538 | border-bottom: 1px solid #CFCFCF; |
| 539 | + height: 40rpx; | |
| 540 | + | |
| 310 | 541 | } |
| 311 | 542 | |
| 312 | 543 | } | ... | ... |
src/pages/purchaseLenses/purchaseLenses.vue
src/pages/user/user.vue
| 1 | 1 | <template> |
| 2 | 2 | <view class="wrap"> |
| 3 | + <!-- 弹窗 --> | |
| 4 | + <uni-popup ref="popup" type="center"> | |
| 5 | + <!-- 给一个左边弹窗的样式 --> | |
| 6 | + <!-- 关闭弹窗按钮 --> | |
| 7 | + <view class="closeBtn" @click="this.$refs.popup.close()">x</view> | |
| 8 | + <view class="popUpWrap" v-if="whichTap==0"> | |
| 9 | + <text>这是一款眼镜及周边产品的销售平台,我们将帮您进行建立全球销售网络,欢迎入驻。</text> | |
| 10 | + | |
| 11 | + <!-- 左 --> | |
| 12 | + <!-- <image class="glassInfo" src="../../static/img/myOpticsData/glassInfo.png" v-if="whichTap == 0" mode="aspectFit"></image> --> | |
| 13 | + <!-- 右 --> | |
| 14 | + <!-- <image class="dataInfo" src="../../static/img/myOpticsData/dataInfo.png" v-else mode="aspectFit"></image> --> | |
| 15 | + </view> | |
| 16 | + <view class="popUpWrap" v-if="whichTap==1"> | |
| 17 | + <text>本平台欢迎全国各地的眼镜工厂、品牌、眼镜店加入。请联系我们申请注册账号。</text> | |
| 18 | + </view> | |
| 19 | + <view class="popUpWrap" v-if="whichTap==2"> | |
| 20 | + <button @click="chatOur(1)">客服1</button> | |
| 21 | + <button @click="chatOur(2)">客服2</button> | |
| 22 | + </view> | |
| 23 | + </uni-popup> | |
| 3 | 24 | <view v-if="isAuth" class="content"> |
| 4 | 25 | <view class="userInfo"> |
| 5 | 26 | <view class="info"> |
| ... | ... | @@ -54,21 +75,21 @@ |
| 54 | 75 | </view> |
| 55 | 76 | <image src="../../static/right.png" mode="aspectFit"></image> |
| 56 | 77 | </view> --> |
| 57 | - <view class="item"> | |
| 78 | + <view class="item" @click="changeTap(0)"> | |
| 58 | 79 | <view class="left"> |
| 59 | 80 | <image src="../../static/img/user/introduce.png" mode="aspectFit"></image> |
| 60 | 81 | <text>系统介绍</text> |
| 61 | 82 | </view> |
| 62 | 83 | <image src="../../static/right.png" mode="aspectFit"></image> |
| 63 | 84 | </view> |
| 64 | - <view class="item"> | |
| 85 | + <view class="item" @click="changeTap(1)"> | |
| 65 | 86 | <view class="left"> |
| 66 | 87 | <image src="../../static/img/user/joinUs.png" mode="aspectFit"></image> |
| 67 | 88 | <text>加入我们</text> |
| 68 | 89 | </view> |
| 69 | 90 | <image src="../../static/right.png" mode="aspectFit"></image> |
| 70 | 91 | </view> |
| 71 | - <view class="item"> | |
| 92 | + <view class="item" @click="changeTap(2)"> | |
| 72 | 93 | <view class="left"> |
| 73 | 94 | <image src="../../static/img/user/service.png" mode="aspectFit"></image> |
| 74 | 95 | <text>联系客服</text> |
| ... | ... | @@ -112,15 +133,18 @@ |
| 112 | 133 | <script> |
| 113 | 134 | import Card from "@/components/CommodityCard/CommodityCard.vue"; |
| 114 | 135 | import store from '@/store'; |
| 136 | + import UniPopup from '@/components/UniPopup/uni-popup.vue' | |
| 115 | 137 | |
| 116 | 138 | export default { |
| 117 | 139 | components: { |
| 118 | - 'Card':Card | |
| 140 | + 'Card':Card, | |
| 141 | + UniPopup | |
| 119 | 142 | }, |
| 120 | 143 | data() { |
| 121 | 144 | return { |
| 122 | 145 | isAuth: true, // 是否显示授权页面, |
| 123 | - pagesnum:1 // 分页请求初始值 | |
| 146 | + pagesnum:1, // 分页请求初始值 | |
| 147 | + whichTap:0, // 弹窗渲染选择条件 | |
| 124 | 148 | } |
| 125 | 149 | }, |
| 126 | 150 | onLoad() { |
| ... | ... | @@ -163,6 +187,22 @@ |
| 163 | 187 | }, |
| 164 | 188 | |
| 165 | 189 | methods: { |
| 190 | + // 弹窗 | |
| 191 | + changeTap(item){ | |
| 192 | + this.whichTap = item | |
| 193 | + this.$refs.popup.open() | |
| 194 | + }, | |
| 195 | + chatOur(item){ | |
| 196 | + if(item==1){ | |
| 197 | + uni.makePhoneCall({ | |
| 198 | + phoneNumber:13376189297, // 客服1 电话 | |
| 199 | + }) | |
| 200 | + } else{ | |
| 201 | + uni.makePhoneCall({ | |
| 202 | + phoneNumber:18014995101 // 客服2 电话 | |
| 203 | + }) | |
| 204 | + } | |
| 205 | + }, | |
| 166 | 206 | // 授权 |
| 167 | 207 | onGotUserInfo(e) { |
| 168 | 208 | console.log('anthInfo', e); |
| ... | ... | @@ -477,5 +517,40 @@ |
| 477 | 517 | border-radius: 30rpx; |
| 478 | 518 | } |
| 479 | 519 | } |
| 520 | + | |
| 521 | + .popUpWrap{ | |
| 522 | + height: 200rpx; | |
| 523 | + width: 542rpx; | |
| 524 | + background-color: #FFFFFF; | |
| 525 | + border-radius: 4px; | |
| 526 | + border: 1px solid #979797; | |
| 527 | + display: flex; | |
| 528 | + align-items: center; | |
| 529 | + justify-items: center; | |
| 530 | + box-sizing: border-box; | |
| 531 | + padding: 0 20rpx; | |
| 532 | + text{ | |
| 533 | + font-size: 12px; | |
| 534 | + color: #333333; | |
| 535 | + } | |
| 536 | + button{ | |
| 537 | + width: 150rpx; | |
| 538 | + height: 80rpx; | |
| 539 | + border-radius: 4px; | |
| 540 | + text-align: center; | |
| 541 | + line-height: 80rpx; | |
| 542 | + font-size: 14px; | |
| 543 | + | |
| 544 | + } | |
| 545 | + } | |
| 546 | + .closeBtn{ | |
| 547 | + height: 28rpx; | |
| 548 | + width: 28rpx; | |
| 549 | + // border: 1px solid red; | |
| 550 | + position: absolute; | |
| 551 | + top: 20rpx; | |
| 552 | + right: 10rpx; | |
| 553 | + } | |
| 554 | + | |
| 480 | 555 | |
| 481 | 556 | </style> | ... | ... |
src/static/img/detail/right.png
475 Bytes
src/static/img/detail/xiala.png
src/store/modules/myLoveList.js
| ... | ... | @@ -2,7 +2,9 @@ import urlAlias from '../url'; |
| 2 | 2 | import request from '../request'; |
| 3 | 3 | |
| 4 | 4 | const { |
| 5 | - mylovelist | |
| 5 | + mylovelist, | |
| 6 | + myloveadd, | |
| 7 | + myloveupdate | |
| 6 | 8 | } = urlAlias; |
| 7 | 9 | |
| 8 | 10 | const state = { |
| ... | ... | @@ -12,7 +14,12 @@ const state = { |
| 12 | 14 | const mutations = { |
| 13 | 15 | INIT: (state, data) => { |
| 14 | 16 | state.loveList = data; |
| 15 | - }, | |
| 17 | + }, | |
| 18 | + // 更新关心人验光单 | |
| 19 | + UPDATE:(state, data) => { | |
| 20 | + // state.loveList.push(data) | |
| 21 | + // console.log('UPDATA=====>',data) | |
| 22 | + } | |
| 16 | 23 | }; |
| 17 | 24 | |
| 18 | 25 | const actions = { |
| ... | ... | @@ -25,7 +32,32 @@ const actions = { |
| 25 | 32 | commit("INIT", res.data.data); |
| 26 | 33 | }, |
| 27 | 34 | }) |
| 28 | - } | |
| 35 | + }, | |
| 36 | + addMylove({ commit }, param) { | |
| 37 | + | |
| 38 | + console.log('myloveupdate-parm====>',param) | |
| 39 | + request({ | |
| 40 | + url: myloveadd, | |
| 41 | + data: param, | |
| 42 | + success: (res) => { | |
| 43 | + console.log('addMylove-parm====>',param) | |
| 44 | + console.log(res.data); | |
| 45 | + // commit("ADD", args); | |
| 46 | + }, | |
| 47 | + }) | |
| 48 | + }, | |
| 49 | + updateMylove({ commit }, param) { | |
| 50 | + request({ | |
| 51 | + url: myloveupdate, | |
| 52 | + data: param, | |
| 53 | + success: (res) => { | |
| 54 | + console.log('myloveupdate-parm====>',param) | |
| 55 | + console.log(res); | |
| 56 | + // commit("UPDATE", param); | |
| 57 | + }, | |
| 58 | + }) | |
| 59 | + }, | |
| 60 | + | |
| 29 | 61 | } |
| 30 | 62 | |
| 31 | 63 | export default { | ... | ... |
src/store/url.js
| ... | ... | @@ -40,7 +40,8 @@ const urlAlias = { |
| 40 | 40 | |
| 41 | 41 | // 用户数据 |
| 42 | 42 | mylovelist: '/app/user/mylovelist', // 关心的人的数据 |
| 43 | - myloveadd: '/app/user/myloveadd' // 添加关心的人 | |
| 43 | + myloveadd: '/app/user/myloveadd', // 添加关心的人 | |
| 44 | + myloveupdate: '/app/user/myloveupdate' // 更新关心人的数据 | |
| 44 | 45 | } |
| 45 | 46 | |
| 46 | 47 | export default urlAlias | ... | ... |