Explorar el Código

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

疯狂的狮子Li hace 1 año
padre
commit
5c701801db
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      src/permission.ts

+ 2 - 0
src/permission.ts

@@ -20,6 +20,8 @@ router.beforeEach(async (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;