|
|
|
@ -269,6 +269,7 @@ |
|
|
|
|
console.log(resArr) |
|
|
|
|
let finishArr = []; |
|
|
|
|
let totalMoney = 0 |
|
|
|
|
let totalNum = 0 |
|
|
|
|
this.selectCountPrice = 0.00 |
|
|
|
|
if (this.isLogin == true) { |
|
|
|
|
// this.getCartList(); |
|
|
|
@ -299,11 +300,12 @@ |
|
|
|
|
finishArr.forEach(e => { |
|
|
|
|
if (e.check) { |
|
|
|
|
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.price, e.cart_num)) |
|
|
|
|
|
|
|
|
|
totalNum += e.cart_num |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
this.selectCountPrice = totalMoney |
|
|
|
|
this.cartCount = totalNum |
|
|
|
|
if(!hasSelected){ |
|
|
|
|
this.selectCountPrice = 0.00 |
|
|
|
|
this.cartCount = 0 |
|
|
|
@ -450,8 +452,8 @@ |
|
|
|
|
cart_id:type_id, |
|
|
|
|
}).then(res=>{ |
|
|
|
|
this.selectCountPrice = 0.00 |
|
|
|
|
this.cartCount = 0 |
|
|
|
|
this.getCartList(); |
|
|
|
|
this.cartCount = 0; |
|
|
|
|
this.getCartList(true); |
|
|
|
|
this.getCartNum(); |
|
|
|
|
return that.$util.Tips({ |
|
|
|
|
title: res.message, |
|
|
|
@ -838,18 +840,20 @@ |
|
|
|
|
// this.checkboxAllChange(true) |
|
|
|
|
if(isChange){ |
|
|
|
|
let totalMoney = 0; |
|
|
|
|
let totalNum = 0 |
|
|
|
|
console.log(this.cartList.valid,"liudan") |
|
|
|
|
this.cartList.valid.forEach(el=>{ |
|
|
|
|
el.list.forEach(e => { |
|
|
|
|
if (e.check) { |
|
|
|
|
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.price, e.cart_num)) |
|
|
|
|
|
|
|
|
|
totalNum += e.cart_num |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.selectCountPrice = totalMoney |
|
|
|
|
this.cartCount = totalNum |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|