diff --git a/src/components/BottomSheet/BottomSheet.vue b/src/components/BottomSheet/BottomSheet.vue index eedbcd8..f03f608 100644 --- a/src/components/BottomSheet/BottomSheet.vue +++ b/src/components/BottomSheet/BottomSheet.vue @@ -494,6 +494,7 @@ import store from '@/store' } let sk_id = this.skuList[j].sk_id console.log('选择的商品sk_id',sk_id,'选择的商品参数',checkedSKU) + console.log('mp_id',this.mp_id,'数量',this.count) this.$emit("addCart",this.mp_id,this.count,checkedSKU,sk_id)//添加购物车 this.$emit("closeBottom")//关闭弹窗 }, diff --git a/src/pages.json b/src/pages.json index 4496544..1e1cc69 100644 --- a/src/pages.json +++ b/src/pages.json @@ -76,18 +76,18 @@ // "navigationBarTitleText": "申请退款" // } // }, - // { - // "path": "pages/address/addAddress", - // "style": { - // "navigationBarTitleText": "新增地址" - // } - // }, - // { - // "path": "pages/address/addressList", - // "style": { - // "navigationBarTitleText": "地址管理" - // } - // }, + { + "path": "pages/address/addAddress", + "style": { + "navigationBarTitleText": "新增地址" + } + }, + { + "path": "pages/address/addressList", + "style": { + "navigationBarTitleText": "地址管理" + } + }, { "path": "pages/confirmOrder/confirmOrder", "style": { diff --git a/src/pages/cart/cart.vue b/src/pages/cart/cart.vue index ade9870..04d345d 100644 --- a/src/pages/cart/cart.vue +++ b/src/pages/cart/cart.vue @@ -215,10 +215,17 @@ export default { }) }, toComfirmOrder(){ - this.$store.state.cart.checkedCartLst = this.cartList.filter(item => item.isChecked) - uni.navigateTo({ - url:`../confirmOrder/confirmOrder?isCart=true`, - }) + this.$store.state.cart.checkedCartLst = this.cartList.filter(item => item.isChecked) + if(this.$store.state.cart.checkedCartLst.length>0){ + uni.navigateTo({ + url:`../confirmOrder/confirmOrder?isCart=true`, + }) + }else{ + uni.showToast({ + title:'您还没有选择宝贝哦~', + icon:'none' + }) + } }, counter(index, isadd, item) { // console.log('item=====>', item) diff --git a/src/pages/frameDetail/frameDetail.vue b/src/pages/frameDetail/frameDetail.vue index 9144cc6..4eacf30 100644 --- a/src/pages/frameDetail/frameDetail.vue +++ b/src/pages/frameDetail/frameDetail.vue @@ -453,11 +453,15 @@ export default { }, // 加入购物车 addCart (mp_id,num,checkedSKU,sk_id) { + this.addCartList.mp_id = mp_id this.addCartList.sk_id = sk_id this.addCartList.num = num this.addCartList.checkedSKU = checkedSKU - console.log('添加购物车的参数',this.addCartList) + console.log('添加购物车的参数',mp_id) + console.log('添加购物车的参数',sk_id) + console.log('添加购物车的参数',num) + console.log('添加购物车的参数',checkedSKU) store.dispatch('cart/addCart', this.addCartList).then((res)=>{ if(res.code == 1){ uni.showToast({