Kirin 3 роки тому
батько
коміт
43b2fb2587
1 змінених файлів з 1 додано та 3 видалено
  1. 1 3
      app/admin/view/store/placeorder/index.php

+ 1 - 3
app/admin/view/store/placeorder/index.php

@@ -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);