From ce17aaa1cbeb575b1cc9a805afc1b0070c22f099 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Sat, 28 May 2022 18:02:31 +0800 Subject: [PATCH] 控制不能重复提交 --- packageA/pages/profile/profile.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packageA/pages/profile/profile.js b/packageA/pages/profile/profile.js index 0b191f0..93f7bf0 100644 --- a/packageA/pages/profile/profile.js +++ b/packageA/pages/profile/profile.js @@ -903,6 +903,7 @@ Page({ success: function (e) { wx.hideLoading(); + th.setData({loading:0}) ; if (e.data.code == 0) { app.globalData.user_id = e.data.data.user_id; @@ -917,10 +918,12 @@ Page({ }, failStatus: function (t) { wx.hideLoading(); + th.setData({loading:0}) ; return app.my_warnning("授权登入失败,请稍后再试!", 0, that); }, fail: function (t) { wx.hideLoading(); + th.setData({loading:0}) ; return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1; } }); @@ -1205,7 +1208,7 @@ Page({ if(th.data.loading) return false; - th.data.loading=1; + th.setData({loading:1}) ; this.zu_ce(post_data); -- libgit2 0.21.4