Commit f555383d9576e8f5a5a82c674452583550ed2594

Authored by 范牧
Exists in master

解决冲突

package-lock.json
... ... @@ -9615,7 +9615,7 @@
9615 9615 },
9616 9616 "normalize-range": {
9617 9617 "version": "0.1.2",
9618   - "resolved": "http://registry.npm.taobao.org/normalize-range/download/normalize-range-0.1.2.tgz",
  9618 + "resolved": "https://registry.npm.taobao.org/normalize-range/download/normalize-range-0.1.2.tgz",
9619 9619 "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=",
9620 9620 "dev": true
9621 9621 },
... ... @@ -9657,7 +9657,7 @@
9657 9657 },
9658 9658 "num2fraction": {
9659 9659 "version": "1.2.2",
9660   - "resolved": "http://registry.npm.taobao.org/num2fraction/download/num2fraction-1.2.2.tgz",
  9660 + "resolved": "https://registry.npm.taobao.org/num2fraction/download/num2fraction-1.2.2.tgz",
9661 9661 "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=",
9662 9662 "dev": true
9663 9663 },
... ...
src/pages/cart/cart.vue
... ... @@ -93,8 +93,8 @@ export default {
93 93 computed: {
94 94  
95 95 cartList() {
96   - // console.log('cart-list', this.$store.state.cart.cartList);
97   - return this.$store.state.cart.cartList
  96 + // console.log('cart-list', this.$store.state.cart.cartList);
  97 + return this.$store.state.cart.cartList
98 98 },
99 99 childIsOpen() {
100 100 const temp = []
... ... @@ -107,97 +107,24 @@ export default {
107 107 }
108 108 },
109 109 onLoad: function() {
110   - // 判断是否授权
111   - // uni.getSetting({
112   - // success(res) {
113   - // console.log('authSetting',res.authSetting)
114   - // if(res.authSetting['scope.userInfo'] !== true) {
115   -
116   - // uni.switchTab({
117   - // url:'/pages/user/user'
118   - // })
119   - // }else {
120   - // }
121   - // }
122   - // })
123   -
124   - // console.log('usr-my',this.$store.state.user.userInfo)
125   - // store.dispatch('cart/addCart',{
126   - // "num":1,
127   - // "pid": 7,//产品id
128   - // "uid":1,
129   - // "sk_id": 72,
130   - // "price": 120,
131   - // "mp_id":1,
132   - // "checkedSKU":{
133   - // "discount": "45",
134   - // "in_price": "6000",
135   - // "kc": "0",
136   - // "model_pic": null,
137   - // "out_price": 191.8,
138   - // "pic": "https://glass.xiuyetang.com//upload_jk/7/7_22AE0C.jpg",
139   - // "pid": "7",
140   - // "real_price": 99,
141   - // "sk_id": "89",
142   - // "sku_name": "1.56非球面防蓝光_黑",
143   - // "sku_shop_value": "",
144   - // "sku_value": "58_61",
145   - // "status": "1",
146   - // },
147   - // });
  110 + // store.dispatch('cart/addCart', {
  111 + // uid: this.$store.state.user.userInfo.uid,
  112 + // openid: this.$store.state.user.userInfo.openid,
  113 + // mp_id: 7,
  114 + // sk_id: 7,
  115 + // num: 1,
  116 + // pid: 8,
  117 + // price: 128,
  118 + // checkedSKU:{},
  119 + // })
148 120 store.dispatch('cart/getCartList', {
149   - uid: 1 // 用户id
  121 + uid: this.$store.state.user.userInfo.uid // 用户id
150 122 })
  123 +
151 124 },
152 125  
153 126 methods: {
154   - // 跳转到对应的选购页面
155   - // toshop(id,type){
156   - // console.log('===',id,type)
157   - // switch(type){
158   - // case 1:
159   - // uni.navigateTo({
160   - // url: `../detailsChoiceArgs/detailsChoiceArgs?oderId=`+id+`&goodType=`+type,
161   - // success: res => {},
162   - // fail: () => {},
163   - // complete: () => {}
164   - // });
165   - // break;
166   - // case 2:
167   - // uni.navigateTo({
168   - // url: `../detailStandard/detailStandard_k?oderId=`+id+`&goodType=`+type,
169   - // success: res => {},
170   - // fail: () => {},
171   - // complete: () => {}
172   - // });
173   - // break;
174   - // case 3||4:
175   - // uni.navigateTo({
176   - // url: `../detailStandard/detailStandard_sun?oderId=`+id+`&goodType=`+type,
177   - // success: res => {},
178   - // fail: () => {},
179   - // complete: () => {}
180   - // });
181   - // break;
182   - // // case 4:
183   - // // uni.navigateTo({
184   - // // url: `../detailStandard/detailStandard_sun?oderId=`+id+`&goodType=`+type,
185   - // // success: res => {},
186   - // // fail: () => {},
187   - // // complete: () => {}
188   - // // });
189   - // case 5:
190   - // uni.navigateTo({
191   - // url: `../purchaseLenses/purchaseLenses?oderId=`+id+`&goodType=`+type,
192   - // success: res => {},
193   - // fail: () => {},
194   - // complete: () => {}
195   - // });
196   - // break;
197   - // default :
198   - // break
199   - // }
200   - // },
  127 +
201 128 toGoods(id, type) {
202 129 uni.navigateTo({
203 130 url: '../frameDetail/frameDetail?oderId=' + id,
... ... @@ -254,9 +181,12 @@ export default {
254 181 } else {
255 182 this.addDisabled = true
256 183 // 修改num
  184 + if(this.childIsOpen[index]){
  185 + this.totalPrice = this.totalPrice + this.$store.state.cart.cartList[index].nowPrice
  186 + }
257 187 store.dispatch('cart/modiCart', {
258   - uid: 1,
259   - // openid: '',
  188 + uid: this.$store.state.user.userInfo.uid,
  189 + openid: this.$store.state.user.userInfo.openid,
260 190 mp_id: mp_id,
261 191 sk_id: sk_id,
262 192 cart_id: cart_id,
... ... @@ -274,9 +204,12 @@ export default {
274 204 } else {
275 205 this.desDisabled = false
276 206 // post 请求修改相关参数
  207 + if(this.childIsOpen[index]){
  208 + this.totalPrice = this.totalPrice - this.$store.state.cart.cartList[index].nowPrice
  209 + }
277 210 store.dispatch('cart/modiCart', {
278   - uid: 1,
279   - // openid: '',
  211 + uid: this.$store.state.user.userInfo.uid,
  212 + openid: this.$store.state.user.userInfo.openid,
280 213 mp_id: mp_id,
281 214 sk_id: sk_id,
282 215 cart_id: cart_id,
... ... @@ -289,6 +222,9 @@ export default {
289 222 this.desDisabled = true
290 223 }
291 224 }
  225 + // store.dispatch('cart/getCartList', {
  226 + // uid: this.$store.state.user.userInfo.uid // 用户id
  227 + // })
292 228 },
293 229  
294 230 Change(isopen, indexC) {
... ... @@ -340,8 +276,8 @@ export default {
340 276 if (res.confirm) {
341 277 // this.$store.state.cart.cartList.splice(index,1)
342 278 store.dispatch('cart/delCart', {
343   - uid: 1, // 用户id
344   - openid: '',
  279 + uid: this.$store.state.user.userInfo.uid,
  280 + openid: this.$store.state.user.userInfo.openid,
345 281 cart_id: cart_id, // 要修改的购物车id
346 282 arg: index // 由于action 传参是能接收两参数,因此将index放入对象
347 283 })
... ...
src/pages/detailStandard/detailStandard_sun.vue
... ... @@ -285,9 +285,9 @@
285 285 <view class="detail2_price">
286 286 <span>¥{{details.data.p_sale_price*count}}</span>
287 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>
  288 + <view class="btn" disabled="this.disabled" @click="counter(false)">-</view>
  289 + <text>{{count}}</text>
  290 + <view class="btn" @click="counter(true)">+</view>
291 291 </view>
292 292 </view>
293 293 </view>
... ...
src/pages/frameDetail/frameDetail.vue
... ... @@ -265,7 +265,7 @@
265 265 v-if="current !==2"
266 266 >
267 267 <view class="D4_esvalue">
268   - <view>{{esvalue}}</view>
  268 + <view>{{esvalue}}&nbsp;&nbsp;{{goodInfo.judgeInfo.good}}</view>
269 269 <view class="D4_2">
270 270 <view
271 271 class="star"
... ... @@ -282,52 +282,26 @@
282 282 </view>
283 283 <view class="D4_list">
284 284 <view
285   - v-for="(assess) in assess"
  285 + v-for="(assess) in goodInfo.judge_tag"
286 286 :key="assess.key"
287   - >{{assess.Iassess}}</view>
  287 + >{{assess.name}}</view>
288 288 </view>
289 289 </view>
290 290 <view
291 291 class="D5"
292 292 v-if="current !==2"
293 293 >
294   - <view class="D5_fixed1">
  294 + <view class="D5_fixed1" @click="consolg(goodInfo.prodIntro1)">
295 295 <image src="/static/img/detail/hr.png"></image>
296 296 <view>商品详细</view>
297 297 <image src="/static/img/detail/hr.png"></image>
298 298 </view>
299   - <view class="D5_all">
300   - <image v-bind:src="imgAll"></image>
301   - </view>
302   - <view class="D5_photoes">
303   - <view class="D5_photoes1">
304   - <view
305   - v-for="(photoes) in photoes"
306   - :key="photoes.value"
307   - >
308   - <image v-bind:src="photoes.img"></image>
309   - <view>{{photoes.value}}</view>
310   - </view>
311   - </view>
312   - <view class="D5_logo1">帕森防蓝光镜片</view>
313   - <view class="D5_logo2">健康护眼,我们是认真的!</view>
314   - <view class="D5_logo3">
315   - <image src='/static/img/detail/logo.png'></image>
316   - </view>
  299 + <view class="D5_all" v-html="test">
  300 + <!-- <block>
  301 + <rich-text :nodes="goodInfo.prodIntro1"></rich-text>
  302 + </block> -->
317 303 </view>
318 304 </view>
319   - <view
320   - class="D6"
321   - v-if="current !==2"
322   - >
323   - <view class="D6_v1">CHARM DETAIL</view>
324   - <view class="D6_v2">细节展示</view>
325   - <view>
326   - <image v-bind:src="imgDetail"></image>
327   - </view>
328   - <view>........................................................................</view>
329   - <view class="D6_v5"><span class="D6_v5_s1">优质选材 </span><span class="D6_v5_s2"> / 金属材质 光泽饱满</span></view>
330   - </view>
331 305  
332 306 <!-- 底部菜单 -->
333 307 <view class="botton">
... ... @@ -339,7 +313,10 @@
339 313 <view class="botton_image">购物车</view>
340 314 </view>
341 315 <view class="botton_2">
342   - <view class="botton_input">加入购物车</view>
  316 + <view
  317 + class="botton_input"
  318 + @tap="toCart()"
  319 + >加入购物车</view>
343 320 <view
344 321 class="botton_now"
345 322 @tap="goPerchase()"
... ... @@ -354,6 +331,7 @@ import store from &#39;@/store&#39;
354 331 export default {
355 332 data () {
356 333 return {
  334 + test: '',
357 335 goodType: 2,
358 336 pid: 0,
359 337 screenItems: [
... ... @@ -371,12 +349,7 @@ export default {
371 349 { key: 4, img: '/static/img/detail/d6.png', standard: '框架耳长', slength: '138mm' },
372 350 { key: 5, img: '/static/img/detail/d7.png', standard: '框架重', slength: '19mm' }
373 351 ],
374   - assess: [
375   - { key: 0, Iassess: '价格实惠' },
376   - { key: 1, Iassess: '美观大方' },
377   - { key: 2, Iassess: '易搭配' }
378   - ],
379   - esvalue: '宝贝好评率 100%',
  352 + esvalue: '宝贝好评率',
380 353 introduction: {
381 354 material: '钛合金',
382 355 func: '抗疲劳/防辐射',
... ... @@ -414,6 +387,8 @@ export default {
414 387 this.parameter[4].slength = `${this.goodInfo.leg_long}mm`
415 388 this.parameter[5].slength = `${this.goodInfo.weight}mm`
416 389 this.tag = this.goodInfo.tag
  390 + this.test = this.goodInfo.prodIntro1
  391 + this.test = this.test.replace(/\<img/gi, '<img style="max-width:100%;height:auto" ')
417 392 })
418 393 },
419 394 computed: {
... ... @@ -667,16 +642,22 @@ export default {
667 642 color: #333333;
668 643 font-weight: bold;
669 644 }
  645 + .D4_list{
  646 + display: grid;
  647 + grid-row-gap: 10px;
  648 + grid-column-gap: 4px;
  649 + }
670 650 .D4_list view {
671   - display: inline-block;
  651 + display: flex;
  652 + justify-content: center;
  653 + align-items: center;
672 654 font-size: 12px;
673   - text-align: center;
674   - margin-right: 12px;
675   - width: 90px;
  655 + width: 118px;
676 656 height: 24px;
677   - line-height: 24px;
  657 + border-radius: 2px;
678 658 background: #f2f2f2;
679 659 color: #666666;
  660 + // letter-spacing: 1px;
680 661 }
681 662 }
682 663 .D5 {
... ... @@ -700,57 +681,11 @@ export default {
700 681 }
701 682 .D5_all {
702 683 width: 100%;
703   - height: 380px;
704   - margin-bottom: 30px;
  684 + margin-top: 30rpx;
  685 + margin-right: 30rpx;
  686 + margin-bottom: 180rpx;
705 687 font-family: "PingFangSC-Regular";
706   - border: #999999 solid 1.5px;
707   - image {
708   - width: 100%;
709   - height: 380px;
710   - }
711   - }
712   - .D5_photoes1 {
713   - display: grid;
714   - grid-template-columns: 48% 48%;
715   - grid-row-gap: 10px;
716   - grid-column-gap: 4%;
717   - image {
718   - width: 100%;
719   - height: 70px;
720   - }
721   - view {
722   - width: 100%;
723   - font-size: 14px;
724   - text-align: center;
725   - background: #949494;
726   - font-family: "PingFangSC-Regular";
727   - color: #ffffff;
728   - view {
729   - height: 24px;
730   - line-height: 24px;
731   - }
732   - }
733   - }
734   - .D5_logo1,
735   - .D5_logo2 {
736   - text-align: center;
737   - }
738   - .D5_logo1 {
739   - margin-top: 40px;
740   - font-size: 24px;
741   - font-weight: bold;
742   - font-family: "PingFangSC-Semibold";
743   - }
744   - .D5_logo2 {
745   - font-size: 12px;
746   - }
747   - .D5_logo3 {
748   - width: 100%;
749   - text-align: center;
750   - image {
751   - width: 50px;
752   - height: 24px;
753   - }
  688 + // border: #999999 solid 1.5px;
754 689 }
755 690 }
756 691 .D6 {
... ...
src/pages/myOrderPaying/myOrderPaying.vue
... ... @@ -80,13 +80,13 @@
80 80 </text>
81 81 <text class="order-info-price">
82 82 <text class="p1">实付</text>
83   - <text class="p2">¥{{orderInfo.order_info.total_fee}}</text>
  83 + <text class="p2">¥{{orderInfo.order_info[0].total_fee}}</text>
84 84 </text>
85 85 <text class="order-info-num">
86   - <text>订单号:{{orderInfo.prepay_id}}</text>
  86 + <text>订单号:{{payId}}</text>
87 87 </text>
88 88 <text class="order-info-time">
89   - <text>下单时间:{{orderInfo.pay_time}}</text>
  89 + <text>下单时间:{{orderInfo.order_info[0].pay_time | timerChange}}</text>
90 90 </text>
91 91 <view class="order-info-hr"></view>
92 92 <view class="order-info-contact">
... ... @@ -133,6 +133,7 @@ export default {
133 133 return {
134 134 // orderInfo:{},
135 135 payId: '',
  136 + payTime: '',
136 137 status: '',
137 138 uid: '',
138 139 openid: '',
... ... @@ -229,6 +230,14 @@ export default {
229 230 }, 1500)
230 231 )
231 232 }
  233 + },
  234 + filters: {
  235 + timerChange: function(value) {
  236 + var newDate = new Date()
  237 + newDate.setTime(value * 1000)
  238 + console.log(newDate.toLocaleString())
  239 + return newDate.toLocaleString()
  240 + }
232 241 }
233 242 }
234 243 </script>
... ...
src/pages/newOpticsData/newOpticsData.vue
... ... @@ -161,13 +161,14 @@
161 161 confirm: false, // 用户是否确认
162 162 tabicon:['/static/detail-button.png','/static/detail-button-unselected.png'],
163 163 name: '夏小花',
  164 + oldname:'',// 用于判读用户是否改变名字
164 165 pickerInfoChioce:{
165   - "leftSph": 0,
166   - "rightSph": 0,
167   - "leftCyl": 0,
168   - "rightCyl": 0,
169   - "leftAxi": 0,
170   - "rightAxi": 0,
  166 + "leftSph": '',
  167 + "rightSph": '',
  168 + "leftCyl": '',
  169 + "rightCyl": '',
  170 + "leftAxi": '',
  171 + "rightAxi": '',
171 172 "time":{
172 173 "year":0,
173 174 "month": 0,
... ... @@ -175,6 +176,7 @@
175 176 }
176 177 },
177 178 pd: '',// 瞳距
  179 + oldpd: '',// 用于判断用户是否改变瞳距
178 180 kinds:Number, // kinds=1,提交为新增验光,2为修改
179 181 mp_id: Number
180 182 };
... ... @@ -225,6 +227,8 @@
225 227 this.name=loveList[option.index].name
226 228 this.pd=loveList[option.index].pd
227 229 this.mp_id=loveList[option.index].mp_id
  230 + this.oldname=loveList[option.index].name
  231 + this.oldpd=loveList[option.index].pd
228 232 // 将kinds =2时的值传到该页面
229 233 this.pickerInfoList[0].nameArray1.unshift(loveList[option.index].leftSph)
230 234 this.pickerInfoList[0].nameArray2.unshift(loveList[option.index].rightSph)
... ... @@ -258,7 +262,7 @@
258 262 uni.showToast({
259 263 title:"请输入有效数据;示例:89",
260 264 icon: "none",
261   - duration: 3000,
  265 + duration: 2000,
262 266 })
263 267 this.pd = ''
264 268 }
... ... @@ -270,88 +274,158 @@
270 274 uni.showToast({
271 275 title:"请输入验光单取名",
272 276 icon: "none",
273   - duration: 3000,
  277 + duration: 2000,
274 278 })
275   - }
276   - if(this.pd==''){
277   - uni.showToast({
278   - title:"请输入瞳距",
279   - icon: "none",
280   - duration: 3000,
281   - })
282   - }
283   - if(this.confirm){
284   - if(this.kinds==1){
285   - // 添加用户验光单
286   - console.log('kinds====>',this.kinds)
287   - store.dispatch('myLoveList/addMylove', {
288   -
289   - uid: this.$store.state.user.userInfo.uid,
290   - openid: this.$store.state.user.userInfo.openid,
291   - // mp_name: this.$store.state.user.userInfo.mp_name,
292   - leftSph: this.pickerInfoChioce.leftSph,
293   - rightSph: this.pickerInfoChioce.rightSph,
294   - leftCyl: this.pickerInfoChioce.leftCyl,
295   - rightCyl: this.pickerInfoChioce.rightCyl,
296   - leftAxi: this.pickerInfoChioce.leftAxi,
297   - rightAxi: this.pickerInfoChioce.rightAxi,
298   - pd: this.pd,// 瞳距
299   - mp_name:this.name,
300   - // time: this.pickerInfoChioce.time,
301   - // img_url2: "http://localhost:8087/images/shop_1/1/",
302   - });
303   - store.dispatch('myLoveList/getLoveList', {
304   - uid: this.$store.state.user.userInfo.uid,
305   - });
306   - uni.navigateBack({
307   - delta:1,
308   - animationDuration:2000
309   - })
310   - }
311   - if(this.kinds==2){
312   - // console.log('kinds====>',this.kinds)
313   - // console.log('pickerindex=====>',this.pickerInfoList[0].nameIndex1)
314   - // console.log('this.pickerInfoChioce====>',type(this.pickerInfoChioce))
315   - const leftList = ["leftSph","leftCyl","leftAxi"];
316   - const rightList = ["rightSph", "rightCyl", "rigthAxi"];
317   - for (let j=0; j<3; j++) {
318   - if(this.pickerInfoList[j].nameIndex1!=0){
  279 + }else{
  280 +
  281 + if(this.pd==''){
  282 + uni.showToast({
  283 + title:"请输入瞳距",
  284 + icon: "none",
  285 + duration: 2000,
  286 + })
  287 + }else{
  288 +
  289 + if(this.kinds==1){
  290 + // 添加用户验光单
  291 + console.log('kinds====>',this.pickerInfoChioce.leftSph)
  292 + console.log('kinds====>',this.pickerInfoChioce.leftSph==Number)
  293 + console.log('kinds====>',this.pickerInfoChioce.rightSph==Number)
  294 + if(this.pickerInfoChioce.rightSph==''||this.pickerInfoChioce.leftSph==''||
  295 + this.pickerInfoChioce.leftCyl==''||this.pickerInfoChioce.rightCyl==''||
  296 + this.pickerInfoChioce.leftAxi==''||this.pickerInfoChioce.rightAxi==''
  297 + ){
  298 + uni.showToast({
  299 + title:"请输入您的验光数据",
  300 + icon: "none",
  301 + duration: 2000,
  302 + })
  303 + }else{
  304 + if(this.confirm){
  305 + store.dispatch('myLoveList/addMylove', {
  306 +
  307 + uid: this.$store.state.user.userInfo.uid,
  308 + openid: this.$store.state.user.userInfo.openid,
  309 + // mp_name: this.$store.state.user.userInfo.mp_name,
  310 + leftSph: this.pickerInfoChioce.leftSph,
  311 + rightSph: this.pickerInfoChioce.rightSph,
  312 + leftCyl: this.pickerInfoChioce.leftCyl,
  313 + rightCyl: this.pickerInfoChioce.rightCyl,
  314 + leftAxi: this.pickerInfoChioce.leftAxi,
  315 + rightAxi: this.pickerInfoChioce.rightAxi,
  316 + pd: this.pd,// 瞳距
  317 + mp_name:this.name,
  318 + // time: this.pickerInfoChioce.time,
  319 + // img_url2: "http://localhost:8087/images/shop_1/1/",
  320 + });
  321 + store.dispatch('myLoveList/getLoveList', {
  322 + uid: this.$store.state.user.userInfo.uid,
  323 + });
  324 + uni.navigateBack({
  325 + delta:1,
  326 + animationDuration:2000
  327 + })
  328 +
  329 + } else{
  330 + uni.showToast({
  331 + title:"请确认您的验光数据",
  332 + icon: "none",
  333 + duration: 3000,
  334 + })
  335 + }
319 336  
320   - store.dispatch('myLoveList/updateMylove', {
321   - uid: this.$store.state.user.userInfo.uid,
322   - openid: this.$store.state.user.userInfo.openid,
323   - mp_id: this.mp_id,
324   - keyname: leftList[j],
325   - keyvalue: this.pickerInfoList[j].nameArray1[this.pickerInfoList[j].nameIndex1],
326   - });
327   - }
328   - if(this.pickerInfoList[j].nameIndex2 !=0) {
329   - store.dispatch('myLoveList/updateMylove', {
330   - uid: this.$store.state.user.userInfo.uid,
331   - openid: this.$store.state.user.userInfo.openid,
332   - mp_id: this.mp_id,
333   - keyname: rightList[j],
334   - keyvalue: this.pickerInfoList[j].nameArray2[this.pickerInfoList[j].nameIndex2]
335   - });
336 337 }
  338 +
337 339 }
338   - store.dispatch('myLoveList/getLoveList', {
339   - uid: this.$store.state.user.userInfo.uid,
340   - });
341   - uni.navigateBack({
342   - delta:1,
343   - animationDuration:2000
344   - })
  340 + if(this.kinds==2){
  341 + // console.log('kinds====>',this.kinds)
  342 + // console.log('pickerindex=====>',this.pickerInfoList[0].nameIndex1)
  343 + // console.log('this.pickerInfoChioce====>',type(this.pickerInfoChioce))
  344 + if(this.confirm){
  345 + const leftList = ["leftSph","leftCyl","leftAxi"];
  346 + const rightList = ["rightSph", "rightCyl", "rightAxi"];
  347 + let flag=0;
  348 + if(this.name!=this.oldname){
  349 + store.dispatch('myLoveList/updateMylove', {
  350 + uid: this.$store.state.user.userInfo.uid,
  351 + openid: this.$store.state.user.userInfo.openid,
  352 + mp_id: this.mp_id,
  353 + keyname: 'name',
  354 + keyvalue: this.name,
  355 + });
  356 + flag=1
  357 + }
  358 + if(this.pd!=this.oldpd){
  359 + store.dispatch('myLoveList/updateMylove', {
  360 + uid: this.$store.state.user.userInfo.uid,
  361 + openid: this.$store.state.user.userInfo.openid,
  362 + mp_id: this.mp_id,
  363 + keyname: 'pd',
  364 + keyvalue: this.pd,
  365 + });
  366 + flag=1
  367 + }
  368 + // 先验证是否有改动项,
  369 + for (let j=0; j<3; j++) {
  370 + if(this.pickerInfoList[j].nameIndex1!=0||this.pickerInfoList[j].nameIndex2!=0){
  371 + if(this.pickerInfoList[j].nameArray1[this.pickerInfoList[j].nameIndex1]!=''&&
  372 + this.pickerInfoList[j].nameArray2[this.pickerInfoList[j].nameIndex2]!=''){
  373 + if(this.pickerInfoList[j].nameIndex1!=0){
  374 + store.dispatch('myLoveList/updateMylove', {
  375 + uid: this.$store.state.user.userInfo.uid,
  376 + openid: this.$store.state.user.userInfo.openid,
  377 + mp_id: this.mp_id,
  378 + keyname: leftList[j],
  379 + keyvalue: this.pickerInfoList[j].nameArray1[this.pickerInfoList[j].nameIndex1],
  380 + });
  381 + }
  382 + if(this.pickerInfoList[j].nameIndex2!=0){
  383 + store.dispatch('myLoveList/updateMylove', {
  384 + uid: this.$store.state.user.userInfo.uid,
  385 + openid: this.$store.state.user.userInfo.openid,
  386 + mp_id: this.mp_id,
  387 + keyname: rightList[j],
  388 + keyvalue: this.pickerInfoList[j].nameArray2[this.pickerInfoList[j].nameIndex2]
  389 + });
  390 + }
  391 + flag=1;
  392 + } else{
  393 + flag=0;
  394 + uni.showToast({
  395 + title:"请输入您的验光数据",
  396 + icon: "none",
  397 + duration: 2000,
  398 + })
  399 +
  400 + }
  401 + }
  402 +
  403 + }
  404 + if(flag!=0){
  405 + store.dispatch('myLoveList/getLoveList', {
  406 + uid: this.$store.state.user.userInfo.uid,
  407 + });
  408 + uni.navigateBack({
  409 + delta:1,
  410 + animationDuration:2000
  411 + })
  412 + }
345 413  
  414 + } else{
  415 + uni.showToast({
  416 + title:"请确认您的验光数据",
  417 + icon: "none",
  418 + duration: 3000,
  419 + })
  420 + }
  421 +
  422 + }
  423 +
  424 +
346 425 }
347   -
348   - } else{
349   - uni.showToast({
350   - title:"请确认你的验光数据",
351   - icon: "none",
352   - duration: 3000,
353   - })
  426 +
354 427 }
  428 +
355 429 },
356 430 changeConfirm() {
357 431 this.confirm = !this.confirm
... ...
src/pages/user/user.vue
... ... @@ -572,6 +572,7 @@ export default {
572 572 display: flex;
573 573 justify-content: space-between;
574 574 flex-wrap: wrap;
  575 + height: 400px;
575 576 .product {
576 577 width: 48%;
577 578 margin: 0 0 20rpx 0;
... ...
src/store/modules/cart.js
... ... @@ -20,11 +20,7 @@ const mutations = {
20 20 MODI: (state, args) => {
21 21 console.log('the num', state.cartList[args.index].num)
22 22 console.log('mutations====>isadd', args)
23   - if (args.isadd) {
24   - state.cartList[args.index].num = args.num
25   - } else {
26   - state.cartList[args.index].num = args.num
27   - }
  23 + state.cartList[args.index].num = args.num
28 24 console.log('the num', state.cartList[args.index].num)
29 25 }
30 26  
... ... @@ -53,14 +49,15 @@ const actions = {
53 49 },
54 50  
55 51 modiCart({ commit }, param) {
56   - const args = Object.assign({ num: param.num }, param.args)
  52 + const arg = Object.assign({ num: param.num }, param.args)
57 53 delete param.args
58 54 request({
59 55 url: cartModi,
60 56 data: param,
61 57 success: (res) => {
  58 + console.log('modiCart-res=====>',res.data)
62 59 console.log('modi-parm', param)
63   - commit('MODI', args)
  60 + commit('MODI', arg)
64 61 },
65 62 fail: (res) => {
66 63 console.log('fail status === > ', res)
... ...
src/store/modules/detailStandard_k.js
... ... @@ -21,7 +21,7 @@ const actions = {
21 21 url: detailStandardUrl,
22 22 data: param,
23 23 success: (res) => {
24   - commit('INIT', res.data);
  24 + commit('INIT', res.data)
25 25 },
26 26 fail: (res) => {
27 27 console.log(" detail fail status === > ", res);
... ...
src/store/modules/myOrder.js
... ... @@ -3,7 +3,7 @@ import request from &#39;../request&#39;;
3 3  
4 4 const {
5 5 myOrderList
6   -} = urlAlias;
  6 +} = urlAlias
7 7  
8 8 // const data = {
9 9 // data: [
... ...
src/store/modules/orderRead.js
1   - import urlAlias from '../url';
2   - import request from '../request';
  1 +import urlAlias from '../url'
  2 +import request from '../request'
3 3  
4   - const {
  4 +const {
5 5 orderRead
6   - } = urlAlias;
  6 +} = urlAlias
7 7  
8 8 const state = {
9   - orderInfo: {},
10   -};
  9 + orderInfo: {}
  10 +}
11 11  
12 12 const mutations = {
13 13 INIT: (state, orderInfo) => {
14   - state.orderInfo = orderInfo;
15   - },
16   -};
  14 + state.orderInfo = orderInfo
  15 + }
  16 +}
17 17  
18 18 const actions = {
19 19 getOrderInfo({ commit }, param) {
20   - request({
21   - url: orderRead,
22   - data: param,
23   - success: (res) => {
24   - commit("INIT", res.data.data);
25   - },
  20 + request({
  21 + url: orderRead,
  22 + data: param,
  23 + success: (res) => {
  24 + commit("INIT", res.data.data)
  25 + }
26 26 })
27   - },
28   -};
  27 + }
  28 +}
29 29  
30 30 export default {
31 31 namespaced: true,
32 32 state,
33 33 mutations,
34   - actions,
35   -};
  34 + actions
  35 +}
... ...