wip: Form改造中

This commit is contained in:
kailong321200875 2023-05-10 09:07:54 +08:00
parent 8e33e5c360
commit 46ac7f88c9
1 changed files with 43 additions and 43 deletions

View File

@ -26,7 +26,7 @@ const whiteList = ['/login'] // 不重定向白名单
router.beforeEach(async (to, from, next) => {
start()
loadStart()
if (!wsCache.get(appStore.getUserInfo)) {
// if (!wsCache.get(appStore.getUserInfo)) {
if (to.path === '/login') {
next({ path: '/' })
} else {
@ -65,13 +65,13 @@ router.beforeEach(async (to, from, next) => {
permissionStore.setIsAddRouters(true)
next(nextData)
}
} else {
if (whiteList.indexOf(to.path) !== -1) {
next()
} else {
next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页
}
}
// } else {
// if (whiteList.indexOf(to.path) !== -1) {
// next()
// } else {
// next(`/login?redirect=${to.path}`) // 否则全部重定向到登录页
// }
// }
})
router.afterEach((to) => {