wip: Form改造中
This commit is contained in:
parent
8e33e5c360
commit
46ac7f88c9
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue