add
This commit is contained in:
parent
d6c715bdd3
commit
99a68f036b
|
@ -286,15 +286,18 @@
|
|||
let checkAll = ref(0)
|
||||
const checkItem = (item, type) => {
|
||||
item.check = type;
|
||||
let price = Number(cartInfo.value.total_price);
|
||||
let price = Number(cartInfo.value.pay_price);
|
||||
if (type) {
|
||||
price += item.sell * item.cart_num;
|
||||
price += (priceKey.value.off_activity == 1 ? item[priceKey.value.price] : item[priceKey.value.op_price]) *
|
||||
item
|
||||
.cart_num;
|
||||
checkAll.value++;
|
||||
} else {
|
||||
price -= item.sell * item.cart_num;
|
||||
price -= (priceKey.value.off_activity == 1 ? item[priceKey.value.price] : item[priceKey.value.op_price]) *
|
||||
item.cart_num;
|
||||
checkAll.value--;
|
||||
}
|
||||
cartInfo.value.total_price = price.toFixed(2);
|
||||
cartInfo.value.pay_price = price.toFixed(2);
|
||||
}
|
||||
const changeAll = (flag = false) => {
|
||||
let count = 0;
|
||||
|
|
Loading…
Reference in New Issue