登录跳转
This commit is contained in:
parent
873ecb949b
commit
16b4af7942
@ -16,7 +16,7 @@ const goto = (url, type = 1)=> {
|
||||
uni.navigateTo({
|
||||
url
|
||||
});
|
||||
} else {
|
||||
} else if (type == 2){
|
||||
uni.redirectTo({
|
||||
url
|
||||
});
|
||||
|
||||
@ -154,7 +154,7 @@
|
||||
goto,
|
||||
async handleUnlogin() {
|
||||
await this.$store.dispatch(USERKEY.LOGOUT)
|
||||
goto(`login/login`)
|
||||
goto(`login/login`, 2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ export default {
|
||||
rootState
|
||||
}, options) {
|
||||
if(!state.token) {
|
||||
goto("login/login", 1)
|
||||
goto("login/login", 2)
|
||||
throw new Error('缺少token')
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user