Commit ce17aaa1cbeb575b1cc9a805afc1b0070c22f099

Authored by yvan.ni
1 parent 8c631ad9

控制不能重复提交

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