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,9 +258,27 @@ Page({ | ||
| 258 | wx.hideLoading(); | 258 | wx.hideLoading(); |
| 259 | if (e.data.code == 0) { | 259 | if (e.data.code == 0) { |
| 260 | app.globalData.user_id = e.data.data.user_id; | 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 | return app.showWarning("授权登入失败!" + e.data.msg); | 279 | return app.showWarning("授权登入失败!" + e.data.msg); |
| 263 | } | 280 | } |
| 281 | + | ||
| 264 | getApp().globalData.login_back = 1; | 282 | getApp().globalData.login_back = 1; |
| 265 | wx.setStorageSync("userinfo", e.data.data); | 283 | wx.setStorageSync("userinfo", e.data.data); |
| 266 | wx.setStorageSync("isAuth", !0), app.globalData.userInfo = e.data.data, app.globalData.userInfo.head_pic = s.getFullUrl(app.globalData.userInfo.head_pic); | 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,21 +315,6 @@ Page({ | ||
| 297 | }, 2000); | 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 | else { | 319 | else { |
| 317 | getApp().my_warnning("系统繁忙,请稍后再试", 0, th); | 320 | getApp().my_warnning("系统繁忙,请稍后再试", 0, th); |
| @@ -459,6 +462,8 @@ Page({ | @@ -459,6 +462,8 @@ Page({ | ||
| 459 | data: getApp().globalData.zc_dd, | 462 | data: getApp().globalData.zc_dd, |
| 460 | success: function (e) { | 463 | success: function (e) { |
| 461 | wx.hideLoading(); | 464 | wx.hideLoading(); |
| 465 | + th.setData({loading: 0,is_check:0}); | ||
| 466 | + | ||
| 462 | if (e.data.code == 0) { | 467 | if (e.data.code == 0) { |
| 463 | app.globalData.user_id = e.data.data.user_id; | 468 | app.globalData.user_id = e.data.data.user_id; |
| 464 | } | 469 | } |
| @@ -470,7 +475,7 @@ Page({ | @@ -470,7 +475,7 @@ Page({ | ||
| 470 | success: function (e) { | 475 | success: function (e) { |
| 471 | if(e.confirm){ | 476 | if(e.confirm){ |
| 472 | getApp().globalData.zc_dd.isreplacemobile=1; | 477 | getApp().globalData.zc_dd.isreplacemobile=1; |
| 473 | - th.setData({loading: 0,is_check:0}); | 478 | + |
| 474 | th.goto_user(); | 479 | th.goto_user(); |
| 475 | } | 480 | } |
| 476 | } | 481 | } |