Commit 3eca08463f66f5a80eaf68b4c0a98218008ac08a
1 parent
ac286902
1. 测试不要重复点击的优化
Showing
1 changed file
with
17 additions
and
2 deletions
packageA/pages/profile/profile.js
@@ -72,8 +72,9 @@ Page({ | @@ -72,8 +72,9 @@ Page({ | ||
72 | check_label: [], //我选择的兴趣标签 | 72 | check_label: [], //我选择的兴趣标签 |
73 | fir_guide_id:null, //存储会员详情接口出来的美导ID | 73 | fir_guide_id:null, //存储会员详情接口出来的美导ID |
74 | isLunar: 0, | 74 | isLunar: 0, |
75 | - lat: null, //维度 | ||
76 | - lon: null, //经度 | 75 | + lat: null, //维度 |
76 | + lon: null, //经度 | ||
77 | + loading:0, | ||
77 | 78 | ||
78 | }, | 79 | }, |
79 | //通过路径跳转到其他页面 | 80 | //通过路径跳转到其他页面 |
@@ -892,9 +893,17 @@ Page({ | @@ -892,9 +893,17 @@ Page({ | ||
892 | 893 | ||
893 | zu_ce:function (dd) { | 894 | zu_ce:function (dd) { |
894 | var th=this; | 895 | var th=this; |
896 | + wx.showLoading({ | ||
897 | + title: "处理中.", | ||
898 | + mask:true | ||
899 | + }) | ||
900 | + | ||
895 | app.request.get("/api/weshop/users/thirdLogin", { | 901 | app.request.get("/api/weshop/users/thirdLogin", { |
896 | data: dd, | 902 | data: dd, |
897 | success: function (e) { | 903 | success: function (e) { |
904 | + | ||
905 | + wx.hideLoading(); | ||
906 | + | ||
898 | if (e.data.code == 0) { | 907 | if (e.data.code == 0) { |
899 | app.globalData.user_id = e.data.data.user_id; | 908 | app.globalData.user_id = e.data.data.user_id; |
900 | } else { | 909 | } else { |
@@ -907,9 +916,11 @@ Page({ | @@ -907,9 +916,11 @@ Page({ | ||
907 | 916 | ||
908 | }, | 917 | }, |
909 | failStatus: function (t) { | 918 | failStatus: function (t) { |
919 | + wx.hideLoading(); | ||
910 | return app.my_warnning("授权登入失败,请稍后再试!", 0, that); | 920 | return app.my_warnning("授权登入失败,请稍后再试!", 0, that); |
911 | }, | 921 | }, |
912 | fail: function (t) { | 922 | fail: function (t) { |
923 | + wx.hideLoading(); | ||
913 | return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1; | 924 | return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1; |
914 | } | 925 | } |
915 | }); | 926 | }); |
@@ -1192,6 +1203,10 @@ Page({ | @@ -1192,6 +1203,10 @@ Page({ | ||
1192 | delete post_data.encryptedData; | 1203 | delete post_data.encryptedData; |
1193 | delete post_data.iv; | 1204 | delete post_data.iv; |
1194 | 1205 | ||
1206 | + | ||
1207 | + if(th.data.loading) return false; | ||
1208 | + th.data.loading=1; | ||
1209 | + | ||
1195 | this.zu_ce(post_data); | 1210 | this.zu_ce(post_data); |
1196 | 1211 | ||
1197 | 1212 |