From c450051a397b209233420fc3a48ea0e5c7ab903c Mon Sep 17 00:00:00 2001 From: xuminyui <576362016@qq.com> Date: Sat, 7 Oct 2023 10:41:30 +0800 Subject: [PATCH] fix --- pages/login/login.vue | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/pages/login/login.vue b/pages/login/login.vue index ea62f6a..ab5b631 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -59,21 +59,15 @@ export default { this.code = res.code; let res1 = await this.$api.login.login({ code: res.code }); if (res1.status == 0) { - this.isShow = true; - this.isNew = res1.data.accountInfo.isNew; + if (!res1.data.accountInfo.isNew) { + uni.reLaunch({ + url: "/pages/home/index" + }); + } else { + this.isShow = true; + this.isNew = res1.data.accountInfo.isNew; + } uni.setStorageSync("token", res1.data.token); - // if (res1.data.accountInfo.isNew) { - // this.openId = res1.data.accountInfo.openId; - // uni.setStorageSync("token", res1.data.token); - // uni.reLaunch({ - // url: "/pages/realName/realName" - // }); - // } else { - // uni.setStorageSync("token", res1.data.token); - // uni.reLaunch({ - // url: "/pages/home/index" - // }); - // } } else { this.$common.msgToast(res1.msg); }