From 51121a6c9eaf9bdd04bf11ce591ca3e2d0903d81 Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期五, 19 五月 2023 15:25:10 +0800 Subject: [PATCH] no message --- uniapp/pages/login/wxlogin.vue | 41 +++++++++++++++++++++++++++-------------- 1 files changed, 27 insertions(+), 14 deletions(-) diff --git a/uniapp/pages/login/wxlogin.vue b/uniapp/pages/login/wxlogin.vue index f91d1e3..3eaa859 100644 --- a/uniapp/pages/login/wxlogin.vue +++ b/uniapp/pages/login/wxlogin.vue @@ -62,6 +62,32 @@ }) } }, + targetToIndex(e) + { + var that = this; + + that.login(e.data.userinfo); + + that.$alert('鐧诲綍鎴愬姛') + setTimeout(function(){ + console.log(e.data.userinfo) + if(!e.data.userinfo.invitation_code) + { + uni.redirectTo({ + url: './setInviteCode' + }) + } + else if (e.data.userinfo.isPwd == 'N') { + uni.redirectTo({ + url: './setPass' + }) + } else { + uni.switchTab({ + url: '../index/index' + }) + } + },1000) + }, wxlogin() { var that = this; if (this.isread) { @@ -80,20 +106,7 @@ if (e.code != 0) return that.$alert(e.msg) var res = e.data; if(res.type == 'goUser'){ - that.login(e.data.userinfo); - that.$alert('鐧诲綍鎴愬姛') - setTimeout(function() { - if (res.userinfo.isPwd == - 'N') { - uni.redirectTo({ - url: './setPass' - }) - } else { - uni.switchTab({ - url: '../index/index' - }) - } - }, 1000) + this.targetToIndex(e); }else if(res.type == 'bindMobile'){ uni.navigateTo({ url: "./bindingPhone?wx="+encodeURIComponent(JSON.stringify(res.info)) -- Gitblit v1.9.3