Kirin 3 years ago
parent
commit
35656499d8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/admin/view/store/placeorder/index.php

+ 2 - 2
app/admin/view/store/placeorder/index.php

@@ -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 {