浏览代码

重新赋值创建方法

xiaohaizhao 9 月之前
父节点
当前提交
c3ac8d62d0
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6 4
      packageA/borrow/index.js

+ 6 - 4
packageA/borrow/index.js

@@ -73,7 +73,8 @@ Page({
         this.onCancel();
         if (detail.name == '按借用合同借用') {
 
-            let usertype = wx.getStorageSync('userMsg').usertype;
+            let usertype = wx.getStorageSync('userMsg').usertype,
+                that = this;
             if (usertype == 1) {
                 wx.navigateTo({
                     url: `/select/agent/index?params=${JSON.stringify({
@@ -90,7 +91,6 @@ Page({
                 getApp().globalData.handleSelect = function ({
                     item
                 }) {
-                    console.log(item)
                     wx.redirectTo({
                         url: `/select/contract/index?params=${JSON.stringify({
                             "id": 20230114092502,
@@ -105,9 +105,11 @@ Page({
                                     "condition": ""
                                 }
                             }
-                        })}&radio=false`
+                        })}&radio=false`,
+                        success() {
+                            getApp().globalData.handleSelect = that.handleCreated.bind(this);
+                        }
                     })
-                    getApp().globalData.handleSelect = this.handleCreated.bind(this);
                 }
             } else {
                 wx.navigateTo({