feat 跳转问题fix

This commit is contained in:
damonyuan 2024-11-18 16:04:46 +08:00
parent acebf25ddc
commit dd1a120ea4
1 changed files with 10 additions and 14 deletions

View File

@ -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'
}
})
</script>
<style lang="scss">