优化白名单页面放行逻辑

This commit is contained in:
RuoYi 2023-11-28 13:00:15 +08:00
parent afd8de5094
commit e6f582bd1a
1 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,8 @@ router.beforeEach((to, from, next) => {
if (to.path === '/login') {
next({ path: '/' })
NProgress.done()
} else if (whiteList.indexOf(to.path) !== -1) {
next()
} else {
if (useUserStore().roles.length === 0) {
isRelogin.show = true