王英杰 1 rok temu
rodzic
commit
ffe23a6596
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      pages/shopping/shopping.js

+ 1 - 1
pages/shopping/shopping.js

@@ -320,8 +320,8 @@ Page({
             dataItem: JSON.stringify(dataItem)
           })
         }).catch(() => {  
-          dataItem.sumPrice = dataItem.priceSale * dataItem['itemQty']
           dataItem.priceSale= Number(0)
+          dataItem.sumPrice = dataItem.priceSale * dataItem['itemQty'] 
           this.setData({
             dataItem: JSON.stringify(dataItem)
           })