From 7fb96f1eace4ff2d3ea43fa6daf4e9afd72b796a Mon Sep 17 00:00:00 2001 From: paulGao Date: Tue, 28 Dec 2021 19:50:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B4=AD=E7=89=A9=E8=BD=A6?= =?UTF-8?q?=E5=85=A8=E9=80=89=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/tabbar/cart/cartList.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pages/tabbar/cart/cartList.vue b/pages/tabbar/cart/cartList.vue index e8691d7..2233360 100644 --- a/pages/tabbar/cart/cartList.vue +++ b/pages/tabbar/cart/cartList.vue @@ -204,7 +204,7 @@ export default { cartDetail: "", //购物车详情 goodsVal: "", //单个商品详情 isEdit: false, // 是否是编辑 - checkout: true, //全选按钮 + checkout: false, //全选按钮 WEIXIN_num: "", //购物车兼容微信步进器 }; }, @@ -516,16 +516,20 @@ export default { uni.stopPullDownRefresh(); if (result.data.success) { this.cartDetail = result.data.result; - this.checkout = true; + let checkouted = true; for (let i = 0; i < this.cartDetail.cartList.length; i++) { let item = this.cartDetail.cartList[i]; + console.log(item); // 循环出当前商品是否全选 if (item.checked == 0) { - this.checkout = false; + checkouted = false; } // 如果有拼团活动顺便删除 item.skuList && item.skuList.forEach((sku) => { + if (sku.checked == 0) { + checkouted = false; + } if(Object.keys(sku.promotionMap).length != 0) { Object.keys(sku.promotionMap).forEach((pro, proIndex) => { @@ -538,6 +542,7 @@ export default { }); } + this.checkout = checkouted; uni.stopPullDownRefresh(); } }) @@ -574,6 +579,7 @@ page { box-shadow: 0 4rpx 12rpx 0 rgba(0, 0, 0, 0.05); } .promotion-notice { + margin-top: 10px; margin-left: 68rpx; font-size: 24rpx; color: #333;