From 12ee0f4bb00c494eaa94a5d9901389dc92f81d13 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Thu, 29 Aug 2024 11:31:21 +0800 Subject: [PATCH] 注册的优化 --- packageE/pages/user/labels/labels.js | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/packageE/pages/user/labels/labels.js b/packageE/pages/user/labels/labels.js index 772c744..af1028d 100644 --- a/packageE/pages/user/labels/labels.js +++ b/packageE/pages/user/labels/labels.js @@ -258,9 +258,27 @@ Page({ wx.hideLoading(); if (e.data.code == 0) { app.globalData.user_id = e.data.data.user_id; - } else { + } + else if(e.data.code==-3){ + th.setData({loading: 0,is_check:0}); + wx.showModal({ + title: e.data.msg, + success: function (e) { + if(e.confirm){ + getApp().globalData.zc_dd.isreplacemobile=1; + + th.update_label(); + } + } + }); + return false; + } + + else { + th.setData({loading: 0,is_check:0}); return app.showWarning("授权登入失败!" + e.data.msg); } + getApp().globalData.login_back = 1; wx.setStorageSync("userinfo", e.data.data); 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({ }, 2000); } - else if(e.data.code==-3){ - wx.showModal({ - title: e.data.msg, - success: function (e) { - if(e.confirm){ - getApp().globalData.zc_dd.isreplacemobile=1; - th.setData({loading: 0,is_check:0}); - th.update_label(); - } - } - }); - return false; - - } - else { getApp().my_warnning("系统繁忙,请稍后再试", 0, th); @@ -459,6 +462,8 @@ Page({ data: getApp().globalData.zc_dd, success: function (e) { wx.hideLoading(); + th.setData({loading: 0,is_check:0}); + if (e.data.code == 0) { app.globalData.user_id = e.data.data.user_id; } @@ -470,7 +475,7 @@ Page({ success: function (e) { if(e.confirm){ getApp().globalData.zc_dd.isreplacemobile=1; - th.setData({loading: 0,is_check:0}); + th.goto_user(); } } -- libgit2 0.21.4