Commit 5f77f7e7e63baefc7f4850295573371f8ed7b744
Exists in
master
解决冲突
Showing
5 changed files
Show diff stats
src/components/CommodityCard/CommodityCard.vue
src/pages/cart/cart.vue
| ... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 | <image :src="item.img_index_url" mode="aspectFit" style="width: 188rpx;height: 168rpx;"></image> |
| 29 | 29 | </view> --> |
| 30 | 30 | <view class="infoRight"> |
| 31 | - <view class="goodName" @tap="toGoods(item.pid,item.p_root_index)">{{item.p_name}}</view> | |
| 31 | + <view class="goodName" @tap="toGoods(item.pid)">{{item.p_name}}</view> | |
| 32 | 32 | <!-- <view class="describ"> --> |
| 33 | 33 | <uni-collapse accordion="true" > |
| 34 | 34 | <uni-collapse-item showAnimation='true' |
| ... | ... | @@ -52,10 +52,10 @@ |
| 52 | 52 | <text class="maxCount">(限购{{maxCount}}副)</text> |
| 53 | 53 | <view class="counter"> |
| 54 | 54 | <view class="btn" disabled="this.addDisabled" type="default" |
| 55 | - @tap="counter(index,false,item.mp_id,item.sk_id,item.num,item.cart_id)">-</view> | |
| 55 | + @tap="counter(index,false,item)">-</view> | |
| 56 | 56 | <text>{{item.num}}</text> |
| 57 | 57 | <view class="btn" disabled="this.desDisabled" type="default" |
| 58 | - @tap="counter(index,true,item.mp_id,item.sk_id,item.num,item.cart_id)">+</view> | |
| 58 | + @tap="counter(index,true,item)">+</view> | |
| 59 | 59 | </view> |
| 60 | 60 | </view> |
| 61 | 61 | </view> |
| ... | ... | @@ -93,7 +93,7 @@ export default { |
| 93 | 93 | computed: { |
| 94 | 94 | |
| 95 | 95 | cartList() { |
| 96 | - // console.log('cart-list', this.$store.state.cart.cartList); | |
| 96 | + console.log('cart-list', this.$store.state.cart.cartList); | |
| 97 | 97 | return this.$store.state.cart.cartList |
| 98 | 98 | }, |
| 99 | 99 | childIsOpen() { |
| ... | ... | @@ -124,58 +124,67 @@ export default { |
| 124 | 124 | |
| 125 | 125 | methods: { |
| 126 | 126 | |
| 127 | - toGoods(id, type) { | |
| 128 | - uni.navigateTo({ | |
| 129 | - url: '../frameDetail/frameDetail?oderId=' + id, | |
| 130 | - success: res => {}, | |
| 131 | - fail: () => {}, | |
| 132 | - complete: () => {} | |
| 133 | - }) | |
| 134 | - console.log('toGoods =====> id:' + id + '======>type:' + type) | |
| 135 | - switch (type) { | |
| 136 | - case 1: | |
| 137 | - uni.navigateTo({ | |
| 138 | - url: '../frameDetail/frameDetail?oderId=' + id + '&goodType=' + type, | |
| 139 | - success: res => {}, | |
| 140 | - fail: () => {}, | |
| 141 | - complete: () => {} | |
| 142 | - }) | |
| 143 | - break | |
| 144 | - case 2: | |
| 145 | - uni.navigateTo({ | |
| 146 | - url: '../frameDetail/frameDetail?oderId=' + id + '&goodType=' + type, | |
| 147 | - success: res => {}, | |
| 148 | - fail: () => {}, | |
| 149 | - complete: () => {} | |
| 150 | - }) | |
| 151 | - break | |
| 152 | - case 3: | |
| 153 | - uni.navigateTo({ | |
| 154 | - url: '../frameDetail/frameDetail?oderId=' + id + '&goodType=' + type, | |
| 155 | - success: res => {}, | |
| 156 | - fail: () => {}, | |
| 157 | - complete: () => {} | |
| 158 | - }) | |
| 159 | - break | |
| 160 | - case 4: | |
| 161 | - uni.navigateTo({ | |
| 162 | - url: '../frameDetail/frameDetail?oderId=' + id + '&goodType=' + type, | |
| 163 | - success: res => {}, | |
| 164 | - fail: () => {}, | |
| 165 | - complete: () => {} | |
| 166 | - }) | |
| 167 | - break | |
| 168 | - default : | |
| 169 | - break | |
| 170 | - } | |
| 127 | + toGoods(id) { | |
| 128 | + console.log('---', '../frameDetail/frameDetail?pid=' + id) | |
| 129 | + uni.navigateTo({ | |
| 130 | + url: '../frameDetail/frameDetail?pid=' + id, | |
| 131 | + success: res => {}, | |
| 132 | + fail: () => {}, | |
| 133 | + complete: () => {} | |
| 134 | + }) | |
| 135 | + // uni.navigateTo({ | |
| 136 | + // url: '../frameDetail/frameDetail?oderId=' + id, | |
| 137 | + // success: res => {}, | |
| 138 | + // fail: () => {}, | |
| 139 | + // complete: () => {} | |
| 140 | + // }) | |
| 141 | + // console.log('toGoods =====> id:' + id + '======>type:' + type) | |
| 142 | + // switch (type) { | |
| 143 | + // case 1: | |
| 144 | + // uni.navigateTo({ | |
| 145 | + // url: '../frameDetail/frameDetail?oderId=' + id + '&goodType=' + type, | |
| 146 | + // success: res => {}, | |
| 147 | + // fail: () => {}, | |
| 148 | + // complete: () => {} | |
| 149 | + // }) | |
| 150 | + // break | |
| 151 | + // case 2: | |
| 152 | + // uni.navigateTo({ | |
| 153 | + // url: '../frameDetail/frameDetail?oderId=' + id + '&goodType=' + type, | |
| 154 | + // success: res => {}, | |
| 155 | + // fail: () => {}, | |
| 156 | + // complete: () => {} | |
| 157 | + // }) | |
| 158 | + // break | |
| 159 | + // case 3: | |
| 160 | + // uni.navigateTo({ | |
| 161 | + // url: '../frameDetail/frameDetail?oderId=' + id + '&goodType=' + type, | |
| 162 | + // success: res => {}, | |
| 163 | + // fail: () => {}, | |
| 164 | + // complete: () => {} | |
| 165 | + // }) | |
| 166 | + // break | |
| 167 | + // case 4: | |
| 168 | + // uni.navigateTo({ | |
| 169 | + // url: '../frameDetail/frameDetail?oderId=' + id + '&goodType=' + type, | |
| 170 | + // success: res => {}, | |
| 171 | + // fail: () => {}, | |
| 172 | + // complete: () => {} | |
| 173 | + // }) | |
| 174 | + // break | |
| 175 | + // default : | |
| 176 | + // break | |
| 177 | + // } | |
| 171 | 178 | }, |
| 172 | 179 | |
| 173 | - counter(index, isadd, mp_id, sk_id, num, cart_id) { | |
| 180 | + counter(index, isadd, item) { | |
| 174 | 181 | // console.log('===>>counter ===>num',num) |
| 175 | 182 | // console.log('===>>counter ===>isadd',isadd) |
| 176 | - num = parseInt(num) | |
| 183 | + console.log('item=====>',item) | |
| 184 | + console.log('num=====>',item.num) | |
| 185 | + let nums = parseInt(item.num) | |
| 177 | 186 | if (isadd) { |
| 178 | - if (num >= this.maxCount) { | |
| 187 | + if (nums >= this.maxCount) { | |
| 179 | 188 | this.addDisabled = true |
| 180 | 189 | } else { |
| 181 | 190 | this.addDisabled = true |
| ... | ... | @@ -186,10 +195,12 @@ export default { |
| 186 | 195 | store.dispatch('cart/modiCart', { |
| 187 | 196 | uid: this.$store.state.user.userInfo.uid, |
| 188 | 197 | openid: this.$store.state.user.userInfo.openid, |
| 189 | - mp_id: mp_id, | |
| 190 | - sk_id: sk_id, | |
| 191 | - cart_id: cart_id, | |
| 192 | - num: num + 1, | |
| 198 | + mp_id: item.mp_id, | |
| 199 | + sk_id: item.sk_id, | |
| 200 | + price: item.nowPrice, | |
| 201 | + pid: item.pid, | |
| 202 | + num: nums + 1, | |
| 203 | + cart_id: item.cart_id, | |
| 193 | 204 | args: { |
| 194 | 205 | index: index, |
| 195 | 206 | isadd: isadd |
| ... | ... | @@ -198,7 +209,7 @@ export default { |
| 198 | 209 | this.addDisabled = false |
| 199 | 210 | } |
| 200 | 211 | } else { |
| 201 | - if (num <= 1) { | |
| 212 | + if (nums <= 1) { | |
| 202 | 213 | this.desDisabled = true |
| 203 | 214 | } else { |
| 204 | 215 | this.desDisabled = false |
| ... | ... | @@ -209,10 +220,12 @@ export default { |
| 209 | 220 | store.dispatch('cart/modiCart', { |
| 210 | 221 | uid: this.$store.state.user.userInfo.uid, |
| 211 | 222 | openid: this.$store.state.user.userInfo.openid, |
| 212 | - mp_id: mp_id, | |
| 213 | - sk_id: sk_id, | |
| 214 | - cart_id: cart_id, | |
| 215 | - num: num - 1, | |
| 223 | + mp_id: item.mp_id, | |
| 224 | + sk_id: item.sk_id, | |
| 225 | + price: item.nowPrice, | |
| 226 | + pid: item.pid, | |
| 227 | + num: nums - 1, | |
| 228 | + cart_id: item.cart_id, | |
| 216 | 229 | args: { |
| 217 | 230 | index: index, |
| 218 | 231 | isadd: isadd |
| ... | ... | @@ -268,6 +281,8 @@ export default { |
| 268 | 281 | // console.log('delcart------>cart_id',cart_id) |
| 269 | 282 | // console.log('cartlist====>delcart',this.$store.state.cart.cartList) |
| 270 | 283 | // console.log('delcart======>index',index) |
| 284 | + const uid=this.$store.state.user.userInfo.uid | |
| 285 | + const openid=this.$store.state.user.userInfo.openid | |
| 271 | 286 | uni.showModal({ |
| 272 | 287 | title: '是否删除该商品', |
| 273 | 288 | // content: '是否删除该商品', |
| ... | ... | @@ -275,8 +290,8 @@ export default { |
| 275 | 290 | if (res.confirm) { |
| 276 | 291 | // this.$store.state.cart.cartList.splice(index,1) |
| 277 | 292 | store.dispatch('cart/delCart', { |
| 278 | - uid: this.$store.state.user.userInfo.uid, | |
| 279 | - openid: this.$store.state.user.userInfo.openid, | |
| 293 | + uid: uid, | |
| 294 | + openid: openid, | |
| 280 | 295 | cart_id: cart_id, // 要修改的购物车id |
| 281 | 296 | arg: index // 由于action 传参是能接收两参数,因此将index放入对象 |
| 282 | 297 | }) | ... | ... |
src/pages/purchaseLenses/purchaseLenses.vue
| ... | ... | @@ -169,181 +169,6 @@ |
| 169 | 169 | <text>确认以上输入信息来源于我的验光数据!</text> |
| 170 | 170 | </view> |
| 171 | 171 | </view> |
| 172 | - <!-- <view class="goods-form"> | |
| 173 | - <view class="data-title"> | |
| 174 | - <image src="../../static/icon-data.png"></image> | |
| 175 | - <text class="p1">填写验光数据</text> | |
| 176 | - </view> | |
| 177 | - <text class="p2">没有验光数据?请到线下眼镜店验光哦~</text> | |
| 178 | - <view class="picker"> | |
| 179 | - <view class="picker-choice"> | |
| 180 | - <view class="choice-left"> | |
| 181 | - <text class="p11">验光单取名:</text> | |
| 182 | - </view> | |
| 183 | - <input | |
| 184 | - class="choice-name uni-input" | |
| 185 | - :value="dataName" | |
| 186 | - @blur="fillData" | |
| 187 | - placeholder="下系" | |
| 188 | - /> | |
| 189 | - </view> | |
| 190 | - </view> | |
| 191 | - <view class="picker"> | |
| 192 | - <view class="picker-choice"> | |
| 193 | - <view class="choice-left"> | |
| 194 | - <text class="p11">{{pickerInfoList[0].nameC}}</text> | |
| 195 | - <text class="p12">{{pickerInfoList[0].nameE}}</text> | |
| 196 | - </view> | |
| 197 | - <text class="p13">左 (OD)</text> | |
| 198 | - <text class="p14">{{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}}</text> | |
| 199 | - <picker | |
| 200 | - @change="bindPickerChange01" | |
| 201 | - :value="pickerInfoList[0].nameIndex1" | |
| 202 | - :range="pickerInfoList[0].nameArray1" | |
| 203 | - > | |
| 204 | - <image src="../../static/detail-tabicon.png"></image> | |
| 205 | - </picker> | |
| 206 | - <text class="p13">右 (OS)</text> | |
| 207 | - <text class="p14">{{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}}</text> | |
| 208 | - <picker | |
| 209 | - @change="bindPickerChange02" | |
| 210 | - :value="pickerInfoList[0].nameIndex2" | |
| 211 | - :range="pickerInfoList[0].nameArray2" | |
| 212 | - > | |
| 213 | - <image src="../../static/detail-tabicon.png"></image> | |
| 214 | - </picker> | |
| 215 | - </view> | |
| 216 | - </view> | |
| 217 | - <view class="picker"> | |
| 218 | - <view class="picker-choice"> | |
| 219 | - <view class="choice-left"> | |
| 220 | - <text class="p11">{{pickerInfoList[1].nameC}}</text> | |
| 221 | - <text class="p12">{{pickerInfoList[1].nameE}}</text> | |
| 222 | - </view> | |
| 223 | - <text class="p13">左 (OD)</text> | |
| 224 | - <text class="p14">{{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}}</text> | |
| 225 | - <picker | |
| 226 | - @change="bindPickerChange11" | |
| 227 | - :value="pickerInfoList[1].nameIndex1" | |
| 228 | - :range="pickerInfoList[1].nameArray1" | |
| 229 | - > | |
| 230 | - <image src="../../static/detail-tabicon.png"></image> | |
| 231 | - </picker> | |
| 232 | - <text class="p13">右 (OS)</text> | |
| 233 | - <text class="p14">{{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}}</text> | |
| 234 | - <picker | |
| 235 | - @change="bindPickerChange12" | |
| 236 | - :value="pickerInfoList[1].nameIndex2" | |
| 237 | - :range="pickerInfoList[1].nameArray2" | |
| 238 | - > | |
| 239 | - <image src="../../static/detail-tabicon.png"></image> | |
| 240 | - </picker> | |
| 241 | - </view> | |
| 242 | - </view> | |
| 243 | - <view class="picker"> | |
| 244 | - <view class="picker-choice"> | |
| 245 | - <view class="choice-left"> | |
| 246 | - <text class="p11">{{pickerInfoList[2].nameC}}</text> | |
| 247 | - <text class="p12">{{pickerInfoList[2].nameE}}</text> | |
| 248 | - </view> | |
| 249 | - <text class="p13">左 (OD)</text> | |
| 250 | - <text class="p14">{{pickerInfoList[2].nameArray1[pickerInfoList[2].nameIndex1]}}</text> | |
| 251 | - <picker | |
| 252 | - @change="bindPickerChange21" | |
| 253 | - :value="pickerInfoList[2].nameIndex1" | |
| 254 | - :range="pickerInfoList[2].nameArray1" | |
| 255 | - > | |
| 256 | - <image src="../../static/detail-tabicon.png"></image> | |
| 257 | - </picker> | |
| 258 | - <text class="p13">右 (OS)</text> | |
| 259 | - <text class="p14">{{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}}</text> | |
| 260 | - <picker | |
| 261 | - @change="bindPickerChange22" | |
| 262 | - :value="pickerInfoList[2].nameIndex2" | |
| 263 | - :range="pickerInfoList[2].nameArray2" | |
| 264 | - > | |
| 265 | - <image src="../../static/detail-tabicon.png"></image> | |
| 266 | - </picker> | |
| 267 | - </view> | |
| 268 | - </view> | |
| 269 | - <view class="picker"> | |
| 270 | - <view class="picker-choice"> | |
| 271 | - <view class="choice-left"> | |
| 272 | - <text class="p11">{{pickerInfoList[3].nameC}}</text> | |
| 273 | - <text class="p12">{{pickerInfoList[3].nameE}}</text> | |
| 274 | - </view> | |
| 275 | - <text class="p13">左 (OD)</text> | |
| 276 | - <text class="p14">{{pickerInfoList[3].nameArray1[pickerInfoList[3].nameIndex1]}}</text> | |
| 277 | - <picker | |
| 278 | - @change="bindPickerChange31" | |
| 279 | - :value="pickerInfoList[3].nameIndex1" | |
| 280 | - :range="pickerInfoList[3].nameArray1" | |
| 281 | - > | |
| 282 | - <image src="../../static/detail-tabicon.png"></image> | |
| 283 | - </picker> | |
| 284 | - <text class="p13">右 (OS)</text> | |
| 285 | - <text class="p14">{{pickerInfoList[3].nameArray2[pickerInfoList[3].nameIndex2]}}</text> | |
| 286 | - <picker | |
| 287 | - @change="bindPickerChange32" | |
| 288 | - :value="pickerInfoList[3].nameIndex2" | |
| 289 | - :range="pickerInfoList[3].nameArray2" | |
| 290 | - > | |
| 291 | - <image src="../../static/detail-tabicon.png"></image> | |
| 292 | - </picker> | |
| 293 | - </view> | |
| 294 | - </view> | |
| 295 | - <view class="picker"> | |
| 296 | - <view class="picker-choice"> | |
| 297 | - <view class="choice-left"> | |
| 298 | - <text class="p11">{{pickerInfoList[4].nameC}}</text> | |
| 299 | - </view> | |
| 300 | - <text class="p13-date">年 (Y)</text> | |
| 301 | - <text | |
| 302 | - class="p14" | |
| 303 | - style="width: 34px;" | |
| 304 | - >{{pickerInfoList[4].nameArray1[pickerInfoList[4].nameIndex1]}}</text> | |
| 305 | - <picker | |
| 306 | - @change="bindPickerChange41" | |
| 307 | - :value="pickerInfoList[4].nameIndex1" | |
| 308 | - :range="pickerInfoList[4].nameArray1" | |
| 309 | - > | |
| 310 | - <image src="../../static/detail-tabicon.png"></image> | |
| 311 | - </picker> | |
| 312 | - <text class="p13-date">月 (M)</text> | |
| 313 | - <text | |
| 314 | - class="p14" | |
| 315 | - style="width: 30px;" | |
| 316 | - >{{pickerInfoList[4].nameArray2[pickerInfoList[4].nameIndex2]}}</text> | |
| 317 | - <picker | |
| 318 | - @change="bindPickerChange42" | |
| 319 | - :value="pickerInfoList[4].nameIndex2" | |
| 320 | - :range="pickerInfoList[4].nameArray2" | |
| 321 | - > | |
| 322 | - <image src="../../static/detail-tabicon.png"></image> | |
| 323 | - </picker> | |
| 324 | - <text class="p13-date">日 (D)</text> | |
| 325 | - <text | |
| 326 | - class="p14" | |
| 327 | - style="width: 30px;" | |
| 328 | - >{{pickerInfoList[4].nameArray3[pickerInfoList[4].nameIndex3]}}</text> | |
| 329 | - <picker | |
| 330 | - @change="bindPickerChange43" | |
| 331 | - :value="pickerInfoList[4].nameIndex3" | |
| 332 | - :range="pickerInfoList[4].nameArray3" | |
| 333 | - > | |
| 334 | - <image src="../../static/detail-tabicon.png"></image> | |
| 335 | - </picker> | |
| 336 | - </view> | |
| 337 | - </view> | |
| 338 | - <view class="confirm"> | |
| 339 | - <image | |
| 340 | - :src="tablist.confirm ? tabicon[0] : tabicon[1]" | |
| 341 | - @click="changeConfirm" | |
| 342 | - ></image> | |
| 343 | - <text>确认以上输入信息来源于我的验光数据!</text> | |
| 344 | - </view> | |
| 345 | - </view> --> | |
| 346 | - | |
| 347 | 172 | </template> |
| 348 | 173 | <template v-else> |
| 349 | 174 | <view |
| ... | ... | @@ -651,8 +476,8 @@ export default { |
| 651 | 476 | uni.showModal({ |
| 652 | 477 | title: '提示', |
| 653 | 478 | content: `是否填充已有的"${e.detail.value}"的数据`, |
| 654 | - success: ({ confirm }) => { | |
| 655 | - if (confirm) { | |
| 479 | + success: (res) => { | |
| 480 | + if (res.confirm) { | |
| 656 | 481 | this.kinds=2 |
| 657 | 482 | console.log('args===>',index) |
| 658 | 483 | // const mpList=Object.assign({},this.$store.state.mympList.mpList) |
| ... | ... | @@ -683,7 +508,9 @@ export default { |
| 683 | 508 | } |
| 684 | 509 | // this.checkedData = mpList[index] |
| 685 | 510 | // console.log('checkedData', this.checkedData) |
| 686 | - } | |
| 511 | + } else if(res.cancel){ | |
| 512 | + this.kinds=2 | |
| 513 | + } | |
| 687 | 514 | } |
| 688 | 515 | }) |
| 689 | 516 | } |
| ... | ... | @@ -746,51 +573,6 @@ export default { |
| 746 | 573 | this.pickerInfoChioce.time.day=this.pickerInfoList[3].nameArray3[e.target.value] |
| 747 | 574 | }, |
| 748 | 575 | |
| 749 | - // 是否填充人员数据 | |
| 750 | - // fillData(e) { | |
| 751 | - // this.isDataName = false | |
| 752 | - // console.log('e---->', e) | |
| 753 | - // const mpList = this.mpList | |
| 754 | - | |
| 755 | -// <<<<<<< HEAD | |
| 756 | - // for (let index = 0; index < mpList.length; index++) { | |
| 757 | - // if (e.detail.value === mpList[index].name) { | |
| 758 | - // this.isDataName = true | |
| 759 | - // uni.showModal({ | |
| 760 | - // title: '提示', | |
| 761 | - // content: `是否填充已有的${e.detail.value}的数据`, | |
| 762 | - // success: ({ confirm }) => { | |
| 763 | - // if (confirm) { | |
| 764 | - // this.checkedData = mpList[index] | |
| 765 | - // console.log('checkedData', this.checkedData) | |
| 766 | - // } | |
| 767 | - // } | |
| 768 | - // }) | |
| 769 | - // } | |
| 770 | - // } | |
| 771 | - // }, | |
| 772 | -// ======= | |
| 773 | - // for (let index = 0; index < mpList.length; index++) { | |
| 774 | - // if (e.detail.value === mpList[index].name) { | |
| 775 | - // this.isDataName = true | |
| 776 | - // uni.showModal({ | |
| 777 | - // title: '提示', | |
| 778 | - // content: `是否自动填充已保存的${e.detail.value}的数据`, | |
| 779 | - // success: ({ confirm }) => { | |
| 780 | - // if (confirm) { | |
| 781 | - // this.checkedData = mpList[index] | |
| 782 | - // console.log('checkedData', this.checkedData) | |
| 783 | - // } | |
| 784 | - // } | |
| 785 | - // }) | |
| 786 | - // } | |
| 787 | - // } | |
| 788 | - // }, | |
| 789 | - // // 确认验光数据 | |
| 790 | - // changeConfirm() { | |
| 791 | - | |
| 792 | - // }, | |
| 793 | -// >>>>>>> 3a0878cc773855146d390a935b133980a5c0ee88 | |
| 794 | 576 | change(num) { |
| 795 | 577 | this.show[num] = !this.show[num] |
| 796 | 578 | this.$forceUpdate() |
| ... | ... | @@ -876,9 +658,6 @@ export default { |
| 876 | 658 | // time: this.pickerInfoChioce.time, |
| 877 | 659 | // img_url2: "http://localhost:8087/images/shop_1/1/", |
| 878 | 660 | }); |
| 879 | - store.dispatch('myLoveList/getLoveList', { | |
| 880 | - uid: this.$store.state.user.userInfo.uid, | |
| 881 | - }); | |
| 882 | 661 | flag=1 |
| 883 | 662 | } else{ |
| 884 | 663 | uni.showToast({ |
| ... | ... | @@ -973,6 +752,10 @@ export default { |
| 973 | 752 | |
| 974 | 753 | } |
| 975 | 754 | if(flag!=0){ |
| 755 | + // 如果数据验证无误,那么更新验光单的数据 | |
| 756 | + store.dispatch('myLoveList/getLoveList', { | |
| 757 | + uid: this.$store.state.user.userInfo.uid, | |
| 758 | + }); | |
| 976 | 759 | let i = 0 |
| 977 | 760 | // 判断出是哪一个sku被选中 |
| 978 | 761 | for (let index = 0; index < this.current.length; index++) { | ... | ... |
src/pages/user/user.vue
| ... | ... | @@ -268,6 +268,7 @@ export default { |
| 268 | 268 | return this.$store.state.user.userInfo.headerphoto |
| 269 | 269 | }, |
| 270 | 270 | userRecommandList() { |
| 271 | + console.log('userRecommandList=====>',this.$store.state.userRecommand.recommandList) | |
| 271 | 272 | return this.$store.state.userRecommand.recommandList |
| 272 | 273 | } |
| 273 | 274 | }, | ... | ... |
src/store/modules/cart.js
| ... | ... | @@ -33,10 +33,6 @@ const actions = { |
| 33 | 33 | data: param, |
| 34 | 34 | success: (res) => { |
| 35 | 35 | console.log('cart===>接口数据', res.data.data) |
| 36 | - // const resData = { | |
| 37 | - // ...res, | |
| 38 | - // data, | |
| 39 | - // } | |
| 40 | 36 | commit('INIT', res.data.data) |
| 41 | 37 | }, |
| 42 | 38 | fail: (res) => { |
| ... | ... | @@ -77,8 +73,6 @@ const actions = { |
| 77 | 73 | success: (res) => { |
| 78 | 74 | console.log('del-parm', param) |
| 79 | 75 | console.log('del-myparms==>', arg) |
| 80 | - // console.log('deacart====>cartList',this.$store.state.cart.cartList) | |
| 81 | - | |
| 82 | 76 | commit('DEL', arg) |
| 83 | 77 | }, |
| 84 | 78 | fail: (res) => { | ... | ... |