Explorar el Código

优化白名单页面放行逻辑

RuoYi hace 1 año
padre
commit
e6f582bd1a
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      src/permission.js

+ 2 - 0
src/permission.js

@@ -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