From 56ccc089eae462e5dc8158fa2c9ae647dabed611 Mon Sep 17 00:00:00 2001
From: BigBoss <2280520255@qq.com>
Date: Mon, 8 Jun 2020 15:45:35 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=B9=E7=AA=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/components/BottomSheet/BottomSheet.vue |  1 +
 src/pages.json                             | 24 ++++++++++++------------
 src/pages/cart/cart.vue                    | 15 +++++++++++----
 src/pages/frameDetail/frameDetail.vue      |  6 +++++-
 4 files changed, 29 insertions(+), 17 deletions(-)

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({
-- 
2.0.0