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