|
|
@@ -330,13 +330,11 @@
|
|
|
}
|
|
|
console.log(pass);
|
|
|
if ((item.num * 1) + (pass * type) > 0) {
|
|
|
- console.log(typeof (item.num * 1))
|
|
|
- console.log(typeof (pass * type))
|
|
|
//修改商品数量
|
|
|
that.changeCartShop(item.cartId, (item.num * 1) + pass * type).then(function (data) {
|
|
|
console.log(data.data.status);
|
|
|
if (data.data.status == 200) {
|
|
|
- item.num += pass * type;
|
|
|
+ item.num = ((item.num * 1) + pass * type).toFixed(3);
|
|
|
layer.msg('成功' + (type > 0 ? '添加' : '减少') + pass + '件商品')
|
|
|
} else {
|
|
|
layer.msg(data.data.msg);
|