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