liudan 5 months ago
parent 299b3d51b1
commit 8ed1eb9515
  1. 9
      pages/order_addcart/order_addcart.vue

@ -272,6 +272,7 @@
// this.getCartList(); // this.getCartList();
getCartList().then(res => { getCartList().then(res => {
console.log(res,"mm") console.log(res,"mm")
let hasSelected = false;
res.data.list.forEach(i=>{ res.data.list.forEach(i=>{
i.list.forEach(u=>{ i.list.forEach(u=>{
@ -284,8 +285,14 @@
if(selectedArr.length==i.list.length){ if(selectedArr.length==i.list.length){
this.$set(i,'allCheck',true) 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; this.cartList.valid = res.data.list;
let allCheckList = this.cartList.valid.filter(p=>{ let allCheckList = this.cartList.valid.filter(p=>{

Loading…
Cancel
Save