18016688350 před 4 roky
rodič
revize
981299eea7

+ 1 - 0
pages/vendingMachine/select.js

@@ -106,6 +106,7 @@ Page({
     itemProduct.productImg = row.productImg
     itemProduct.productSchemePrice = row.productPrice
     itemProduct.productPrice = row.productPrice
+    itemProduct.gridCount = 5
     list.splice(this.data.index,1,itemProduct)
     prevPage.setData({
       selectGridProductList:list,

+ 6 - 0
pages/vendingMachine/settledStore.js

@@ -295,6 +295,12 @@ Page({
     number: function (e) {
       let value = this.validateNumber(e.detail.value)
       let inx = `selectGridProductList[${e.target.dataset.index}].${e.target.dataset.name}`
+      if(parseInt(value)>5||parseInt(value)<=0){
+        util.toast('可存放格子数量为1-5')
+        value = 5;
+      }
+      
+
       this.setData({
         //parseInt将数字字符串转换成数字
         [inx]: parseInt(value)