登录跳转

This commit is contained in:
aihe 2024-02-28 17:48:44 +08:00
parent 873ecb949b
commit 16b4af7942
3 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ const goto = (url, type = 1)=> {
uni.navigateTo({
url
});
} else {
} else if (type == 2){
uni.redirectTo({
url
});

View File

@ -154,7 +154,7 @@
goto,
async handleUnlogin() {
await this.$store.dispatch(USERKEY.LOGOUT)
goto(`login/login`)
goto(`login/login`, 2)
}
}
}

View File

@ -66,7 +66,7 @@ export default {
rootState
}, options) {
if(!state.token) {
goto("login/login", 1)
goto("login/login", 2)
throw new Error('缺少token')
}