update 优化 前端白名单页面放行逻辑

This commit is contained in:
疯狂的狮子Li 2023-11-29 16:02:37 +08:00
parent 9b4692b625
commit 5c701801db

View File

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