处理购物车商品数量的错误
This commit is contained in:
parent
d47a19d330
commit
72162b0759
@ -569,7 +569,7 @@
|
||||
cart_num: goods.cart_num + 1
|
||||
}).then(res => {
|
||||
goods.cart_num = Number(goods.cart_num) + 1
|
||||
that.cartTotalCount = Number(that.cartTotalCount) + 1;
|
||||
// that.cartTotalCount = Number(that.cartTotalCount) + 1;
|
||||
if (goods.hasOwnProperty('productAttr') && goods.cart_num > goods.productAttr.stock) {
|
||||
goods.cart_num = goods.productAttr.stock;
|
||||
goods.numAdd = true;
|
||||
@ -635,7 +635,7 @@
|
||||
goods.numSub = true;
|
||||
}
|
||||
goods.cart_num = Number(goods.cart_num) - 1
|
||||
this.cartTotalCount = Number(this.cartTotalCount) - 1;
|
||||
// this.cartTotalCount = Number(this.cartTotalCount) - 1;
|
||||
this.cartAllCheck('goodsCheck')
|
||||
}).catch(error => {
|
||||
this.$util.Tips({
|
||||
|
Loading…
x
Reference in New Issue
Block a user