From 8ed1eb9515a27706c386123b02c17edeeedfb0ec Mon Sep 17 00:00:00 2001 From: liudan <18634735655@163.com> Date: Tue, 9 Jul 2024 16:35:04 +0800 Subject: [PATCH] 1 --- pages/order_addcart/order_addcart.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pages/order_addcart/order_addcart.vue b/pages/order_addcart/order_addcart.vue index 6e4e2b7..79347fd 100644 --- a/pages/order_addcart/order_addcart.vue +++ b/pages/order_addcart/order_addcart.vue @@ -272,6 +272,7 @@ // this.getCartList(); getCartList().then(res => { console.log(res,"mm") + let hasSelected = false; res.data.list.forEach(i=>{ i.list.forEach(u=>{ @@ -284,8 +285,14 @@ if(selectedArr.length==i.list.length){ this.$set(i,'allCheck',true) } - + if(selectedArr.length>0){ + hasSelected = true; + } }) + if(!hasSelected){ + this.selectCountPrice = 0.00 + this.cartCount = 0 + } this.cartList.valid = res.data.list; let allCheckList = this.cartList.valid.filter(p=>{