Commit 56ccc089eae462e5dc8158fa2c9ae647dabed611

Authored by BigBoss
1 parent 88c0598d36
Exists in master

修改弹窗

src/components/BottomSheet/BottomSheet.vue
... ... @@ -494,6 +494,7 @@ import store from '@/store'
494 494 }
495 495 let sk_id = this.skuList[j].sk_id
496 496 console.log('选择的商品sk_id',sk_id,'选择的商品参数',checkedSKU)
  497 + console.log('mp_id',this.mp_id,'数量',this.count)
497 498 this.$emit("addCart",this.mp_id,this.count,checkedSKU,sk_id)//添加购物车
498 499 this.$emit("closeBottom")//关闭弹窗
499 500 },
... ...
... ... @@ -76,18 +76,18 @@
76 76 // "navigationBarTitleText": "申请退款"
77 77 // }
78 78 // },
79   - // {
80   - // "path": "pages/address/addAddress",
81   - // "style": {
82   - // "navigationBarTitleText": "新增地址"
83   - // }
84   - // },
85   - // {
86   - // "path": "pages/address/addressList",
87   - // "style": {
88   - // "navigationBarTitleText": "地址管理"
89   - // }
90   - // },
  79 + {
  80 + "path": "pages/address/addAddress",
  81 + "style": {
  82 + "navigationBarTitleText": "新增地址"
  83 + }
  84 + },
  85 + {
  86 + "path": "pages/address/addressList",
  87 + "style": {
  88 + "navigationBarTitleText": "地址管理"
  89 + }
  90 + },
91 91 {
92 92 "path": "pages/confirmOrder/confirmOrder",
93 93 "style": {
... ...
src/pages/cart/cart.vue
... ... @@ -215,10 +215,17 @@ export default {
215 215 })
216 216 },
217 217 toComfirmOrder(){
218   - this.$store.state.cart.checkedCartLst = this.cartList.filter(item => item.isChecked)
219   - uni.navigateTo({
220   - url:`../confirmOrder/confirmOrder?isCart=true`,
221   - })
  218 + this.$store.state.cart.checkedCartLst = this.cartList.filter(item => item.isChecked)
  219 + if(this.$store.state.cart.checkedCartLst.length>0){
  220 + uni.navigateTo({
  221 + url:`../confirmOrder/confirmOrder?isCart=true`,
  222 + })
  223 + }else{
  224 + uni.showToast({
  225 + title:'您还没有选择宝贝哦~',
  226 + icon:'none'
  227 + })
  228 + }
222 229 },
223 230 counter(index, isadd, item) {
224 231 // console.log('item=====>', item)
... ...
src/pages/frameDetail/frameDetail.vue
... ... @@ -453,11 +453,15 @@ export default {
453 453 },
454 454 // 加入购物车
455 455 addCart (mp_id,num,checkedSKU,sk_id) {
  456 +
456 457 this.addCartList.mp_id = mp_id
457 458 this.addCartList.sk_id = sk_id
458 459 this.addCartList.num = num
459 460 this.addCartList.checkedSKU = checkedSKU
460   - console.log('添加购物车的参数',this.addCartList)
  461 + console.log('添加购物车的参数',mp_id)
  462 + console.log('添加购物车的参数',sk_id)
  463 + console.log('添加购物车的参数',num)
  464 + console.log('添加购物车的参数',checkedSKU)
461 465 store.dispatch('cart/addCart', this.addCartList).then((res)=>{
462 466 if(res.code == 1){
463 467 uni.showToast({
... ...