版本更新
This commit is contained in:
@@ -11,18 +11,22 @@ const router = createRouter({
|
||||
|
||||
//全局路由前置守卫
|
||||
router.beforeEach((to, from, next) => {
|
||||
if(to.name === 'Auth' && store.getters.getToken != '' && uni.getStorageSync('token') != ''){
|
||||
if(uni.getStorageSync('isnew') === 0){
|
||||
if(to.name === 'Auth'){
|
||||
if(store.getters.getToken != '' || uni.getStorageSync('token') != ''){
|
||||
if(uni.getStorageSync('isnew') === 0){
|
||||
next({
|
||||
name: 'AuthRole',
|
||||
NAVTYPE: 'replace'
|
||||
})
|
||||
return
|
||||
}
|
||||
next({
|
||||
name: 'AuthRole',
|
||||
NAVTYPE: 'replace'
|
||||
name: 'Life',
|
||||
NAVTYPE: 'pushTab'
|
||||
})
|
||||
return
|
||||
}
|
||||
next({
|
||||
name: 'Life',
|
||||
NAVTYPE: 'pushTab'
|
||||
})
|
||||
next();
|
||||
return
|
||||
}
|
||||
next();
|
||||
|
||||
Reference in New Issue
Block a user