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' -} +})