Commit ce17aaa1cbeb575b1cc9a805afc1b0070c22f099

Authored by yvan.ni
1 parent 8c631ad9

控制不能重复提交

packageA/pages/profile/profile.js
... ... @@ -903,6 +903,7 @@ Page({
903 903 success: function (e) {
904 904  
905 905 wx.hideLoading();
  906 + th.setData({loading:0}) ;
906 907  
907 908 if (e.data.code == 0) {
908 909 app.globalData.user_id = e.data.data.user_id;
... ... @@ -917,10 +918,12 @@ Page({
917 918 },
918 919 failStatus: function (t) {
919 920 wx.hideLoading();
  921 + th.setData({loading:0}) ;
920 922 return app.my_warnning("授权登入失败,请稍后再试!", 0, that);
921 923 },
922 924 fail: function (t) {
923 925 wx.hideLoading();
  926 + th.setData({loading:0}) ;
924 927 return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1;
925 928 }
926 929 });
... ... @@ -1205,7 +1208,7 @@ Page({
1205 1208  
1206 1209  
1207 1210 if(th.data.loading) return false;
1208   - th.data.loading=1;
  1211 + th.setData({loading:1}) ;
1209 1212  
1210 1213 this.zu_ce(post_data);
1211 1214  
... ...