Kirin 3 years ago
parent
commit
3f808e608f
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 * 1) + num * 1;
+                                that.shopList[ind].num = ((that.shopList[ind].num * 1) + num * 1).toFixed(2);
                                 console.log(that.shopList, '添加数据后对象')
 
                             } else {
                                 //初始化商品
-                                that.initShopData(product, cartId, num * 1)
+                                that.initShopData(product, cartId, (num * 1).toFixed(2))
                                 console.log(that.shopList, '初始化后数据对象')
                             }
                         } else {