From dd1a120ea4a7eadd4d20153b2872cefda1e4770c Mon Sep 17 00:00:00 2001 From: damonyuan <404054358@qq.com> Date: Mon, 18 Nov 2024 16:04:46 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E8=B7=B3=E8=BD=AC=E9=97=AE=E9=A2=98fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uniapp/src/pages/login/login.vue | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/uniapp/src/pages/login/login.vue b/uniapp/src/pages/login/login.vue index 14865787..9f768e63 100644 --- a/uniapp/src/pages/login/login.vue +++ b/uniapp/src/pages/login/login.vue @@ -333,7 +333,6 @@ const loginFun = async () => { } } - const loginHandle = async (data: any) => { const { token, mobile } = data if (!mobile && isForceBindMobile.value) { @@ -355,17 +354,17 @@ const loginHandle = async (data: any) => { // 刷新上一个页面 onLoad && onLoad(options) } else if (cache.get(BACK_URL)) { - try { - router.redirectTo(cache.get(BACK_URL)) + try { + router.switchTab(cache.get(BACK_URL)) } catch (error) { - router.switchTab(cache.get(BACK_URL)) + router.redirectTo(cache.get(BACK_URL)) } } else { - try { - router.reLaunch('/pages/index/index') - } catch (error) { - router.switchTab('/pages/index/index') - } + // try { + // router.reLaunch('/pages/index/index') + // } catch (error) { + router.switchTab('/pages/index/index') + //} } cache.remove(BACK_URL) } @@ -388,7 +387,7 @@ const oaLogin = async (options: any = { getUrl: true }) => { const wxLogin = async () => { if (!isCheckAgreement.value && isOpenAgreement.value) { showModel.value = true - console.log(showModel.value) + // console.log(showModel.value) return } @@ -481,10 +480,7 @@ onLoad(async () => { wechatOa.setAuthData() } //#endif -}) -if (isLogin.value == true) { - window.location.href = '/mobile/pages/user/user' -} +})