zhuliu пре 1 година
родитељ
комит
e3adf33eeb
2 измењених фајлова са 6 додато и 4 уклоњено
  1. 3 2
      myComponents/product/product.js
  2. 3 2
      pages/searchResults/searchResults.js

+ 3 - 2
myComponents/product/product.js

@@ -279,17 +279,18 @@ Component({
         productIds:[product.id],
         ifCancelConcern:false
       }
+      var that = this
       wx.showActionSheet({
         itemList: ['只取消监控', '取消监控和关注', '关闭'],
         success (res) {
           console.log(res.tapIndex)
           switch(res.tapIndex){
             case 0:
-              this.cancelMonitoring(params,index,0)
+              that.cancelMonitoring(params,index,0)
               break;
             case 1:
               params.ifCancelConcern = true
-              this.cancelMonitoring(params,index,1)
+              that.cancelMonitoring(params,index,1)
               break;
             case 2:
               break

+ 3 - 2
pages/searchResults/searchResults.js

@@ -577,17 +577,18 @@ cancelControl(){
     productIds:[product.id],
     ifCancelConcern:false
   }
+  var that = this
   wx.showActionSheet({
     itemList: ['只取消监控', '取消监控和关注', '关闭'],
     success (res) {
       console.log(res.tapIndex)
       switch(res.tapIndex){
         case 0:
-          this.cancelMonitoring(params,0)
+          that.cancelMonitoring(params,0)
           break;
         case 1:
           params.ifCancelConcern = true
-          this.cancelMonitoring(params,1)
+          that.cancelMonitoring(params,1)
           break;
         case 2:
           break