浏览代码

update code

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