创建虚拟人物,调整登录逻辑

This commit is contained in:
唐明明
2022-06-07 17:34:05 +08:00
parent 1c6091371e
commit b76167eb0d
19 changed files with 4434 additions and 4784 deletions

View File

@@ -20,7 +20,21 @@ const router = createRouter({
// console.log(...ROUTES)
//全局路由前置守卫
router.beforeEach((to, from, next) => {
router.beforeEach((to, from, next) => {
if(to.name === 'Auth' && store.getters.getToken != '' && uni.getStorageSync('token') != ''){
if(store.getters.getIsNew === 0 && uni.getStorageSync('isnew') === 0){
next({
name: 'Role',
NAVTYPE: 'replace'
})
return
}
next({
name: 'Life',
NAVTYPE: 'pushTab'
})
return
}
next();
});