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 loginHandle = async (data: any) => {
const { token, mobile } = data const { token, mobile } = data
if (!mobile && isForceBindMobile.value) { if (!mobile && isForceBindMobile.value) {
@ -356,16 +355,16 @@ const loginHandle = async (data: any) => {
onLoad && onLoad(options) onLoad && onLoad(options)
} else if (cache.get(BACK_URL)) { } else if (cache.get(BACK_URL)) {
try { try {
router.redirectTo(cache.get(BACK_URL)) router.switchTab(cache.get(BACK_URL))
} catch (error) { } catch (error) {
router.switchTab(cache.get(BACK_URL)) router.redirectTo(cache.get(BACK_URL))
} }
} else { } else {
try { // try {
router.reLaunch('/pages/index/index') // router.reLaunch('/pages/index/index')
} catch (error) { // } catch (error) {
router.switchTab('/pages/index/index') router.switchTab('/pages/index/index')
} //}
} }
cache.remove(BACK_URL) cache.remove(BACK_URL)
} }
@ -388,7 +387,7 @@ const oaLogin = async (options: any = { getUrl: true }) => {
const wxLogin = async () => { const wxLogin = async () => {
if (!isCheckAgreement.value && isOpenAgreement.value) { if (!isCheckAgreement.value && isOpenAgreement.value) {
showModel.value = true showModel.value = true
console.log(showModel.value) // console.log(showModel.value)
return return
} }
@ -482,9 +481,6 @@ onLoad(async () => {
} }
//#endif //#endif
}) })
if (isLogin.value == true) {
window.location.href = '/mobile/pages/user/user'
}
</script> </script>
<style lang="scss"> <style lang="scss">