|
|
@@ -414,12 +414,12 @@
|
|
|
console.log(ind, '当前下标')
|
|
|
//判断这个商品是否已经存在数组
|
|
|
if (ind > -1) {
|
|
|
- that.shopList[ind].num = ((that.shopList[ind].num * 1) + num * 1).toFixed(2);
|
|
|
+ that.shopList[ind].num = ((+that.shopList[ind].num) + (+num));
|
|
|
console.log(that.shopList, '添加数据后对象')
|
|
|
|
|
|
} else {
|
|
|
//初始化商品
|
|
|
- that.initShopData(product, cartId, (num * 1).toFixed(2))
|
|
|
+ that.initShopData(product, cartId, (+num))
|
|
|
console.log(that.shopList, '初始化后数据对象')
|
|
|
}
|
|
|
} else {
|