liudan 5 months ago
parent 6223798e62
commit 299b3d51b1
  1. 13
      pages/order_addcart/order_addcart.vue

@ -257,6 +257,7 @@
// }, // },
onShow() { onShow() {
console.log(this.cartList.valid) console.log(this.cartList.valid)
let resArr=[] let resArr=[]
this.cartList.valid.forEach(item=>{ this.cartList.valid.forEach(item=>{
@ -287,6 +288,15 @@
}) })
this.cartList.valid = res.data.list; this.cartList.valid = res.data.list;
let allCheckList = this.cartList.valid.filter(p=>{
return p.allCheck
})
if(allCheckList.length==this.cartList.valid.length){
this.$set(this,'isAllSelect',true)
}else{
this.$set(this,'isAllSelect',false)
}
this.cartList.invalid = res.data.fail this.cartList.invalid = res.data.fail
if(res.data.list.length == 0 && res.data.list.length == 0){ if(res.data.list.length == 0 && res.data.list.length == 0){
this.recommend = true; this.recommend = true;
@ -296,6 +306,7 @@
}else{ }else{
this.recommend = false this.recommend = false
} }
}) })
this.getCartNum(); this.getCartNum();
}else{ }else{
@ -416,6 +427,8 @@
cartDel({ cartDel({
cart_id:type_id, cart_id:type_id,
}).then(res=>{ }).then(res=>{
this.selectCountPrice = 0.00
this.cartCount = 0
this.getCartList(); this.getCartList();
this.getCartNum(); this.getCartNum();
return that.$util.Tips({ return that.$util.Tips({

Loading…
Cancel
Save