wip: Form改造中

master
kailong321200875 3 years ago
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…
Cancel
Save