From 3eca08463f66f5a80eaf68b4c0a98218008ac08a Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Sat, 28 May 2022 11:33:06 +0800 Subject: [PATCH] 1. 测试不要重复点击的优化 --- packageA/pages/profile/profile.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/packageA/pages/profile/profile.js b/packageA/pages/profile/profile.js index 1b90f26..0b191f0 100644 --- a/packageA/pages/profile/profile.js +++ b/packageA/pages/profile/profile.js @@ -72,8 +72,9 @@ Page({ check_label: [], //我选择的兴趣标签 fir_guide_id:null, //存储会员详情接口出来的美导ID isLunar: 0, - lat: null, //维度 - lon: null, //经度 + lat: null, //维度 + lon: null, //经度 + loading:0, }, //通过路径跳转到其他页面 @@ -892,9 +893,17 @@ Page({ zu_ce:function (dd) { var th=this; + wx.showLoading({ + title: "处理中.", + mask:true + }) + app.request.get("/api/weshop/users/thirdLogin", { data: dd, success: function (e) { + + wx.hideLoading(); + if (e.data.code == 0) { app.globalData.user_id = e.data.data.user_id; } else { @@ -907,9 +916,11 @@ Page({ }, failStatus: function (t) { + wx.hideLoading(); return app.my_warnning("授权登入失败,请稍后再试!", 0, that); }, fail: function (t) { + wx.hideLoading(); return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1; } }); @@ -1192,6 +1203,10 @@ Page({ delete post_data.encryptedData; delete post_data.iv; + + if(th.data.loading) return false; + th.data.loading=1; + this.zu_ce(post_data); -- libgit2 0.21.4