Commit 12ee0f4bb00c494eaa94a5d9901389dc92f81d13
1 parent
ece4303b
注册的优化
Showing
1 changed file
with
22 additions
and
17 deletions
packageE/pages/user/labels/labels.js
... | ... | @@ -258,9 +258,27 @@ Page({ |
258 | 258 | wx.hideLoading(); |
259 | 259 | if (e.data.code == 0) { |
260 | 260 | app.globalData.user_id = e.data.data.user_id; |
261 | - } else { | |
261 | + } | |
262 | + else if(e.data.code==-3){ | |
263 | + th.setData({loading: 0,is_check:0}); | |
264 | + wx.showModal({ | |
265 | + title: e.data.msg, | |
266 | + success: function (e) { | |
267 | + if(e.confirm){ | |
268 | + getApp().globalData.zc_dd.isreplacemobile=1; | |
269 | + | |
270 | + th.update_label(); | |
271 | + } | |
272 | + } | |
273 | + }); | |
274 | + return false; | |
275 | + } | |
276 | + | |
277 | + else { | |
278 | + th.setData({loading: 0,is_check:0}); | |
262 | 279 | return app.showWarning("授权登入失败!" + e.data.msg); |
263 | 280 | } |
281 | + | |
264 | 282 | getApp().globalData.login_back = 1; |
265 | 283 | wx.setStorageSync("userinfo", e.data.data); |
266 | 284 | wx.setStorageSync("isAuth", !0), app.globalData.userInfo = e.data.data, app.globalData.userInfo.head_pic = s.getFullUrl(app.globalData.userInfo.head_pic); |
... | ... | @@ -297,21 +315,6 @@ Page({ |
297 | 315 | }, 2000); |
298 | 316 | } |
299 | 317 | |
300 | - else if(e.data.code==-3){ | |
301 | - wx.showModal({ | |
302 | - title: e.data.msg, | |
303 | - success: function (e) { | |
304 | - if(e.confirm){ | |
305 | - getApp().globalData.zc_dd.isreplacemobile=1; | |
306 | - th.setData({loading: 0,is_check:0}); | |
307 | - th.update_label(); | |
308 | - } | |
309 | - } | |
310 | - }); | |
311 | - return false; | |
312 | - | |
313 | - } | |
314 | - | |
315 | 318 | |
316 | 319 | else { |
317 | 320 | getApp().my_warnning("系统繁忙,请稍后再试", 0, th); |
... | ... | @@ -459,6 +462,8 @@ Page({ |
459 | 462 | data: getApp().globalData.zc_dd, |
460 | 463 | success: function (e) { |
461 | 464 | wx.hideLoading(); |
465 | + th.setData({loading: 0,is_check:0}); | |
466 | + | |
462 | 467 | if (e.data.code == 0) { |
463 | 468 | app.globalData.user_id = e.data.data.user_id; |
464 | 469 | } |
... | ... | @@ -470,7 +475,7 @@ Page({ |
470 | 475 | success: function (e) { |
471 | 476 | if(e.confirm){ |
472 | 477 | getApp().globalData.zc_dd.isreplacemobile=1; |
473 | - th.setData({loading: 0,is_check:0}); | |
478 | + | |
474 | 479 | th.goto_user(); |
475 | 480 | } |
476 | 481 | } | ... | ... |