From-wh преди 2 години
родител
ревизия
8e84eaf838
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      template/admin/src/router/index.js

+ 2 - 2
template/admin/src/router/index.js

@@ -106,8 +106,8 @@ router.beforeEach(async (to, from, next) => {
     const token = getCookies('token');
     if (token && token !== 'undefined') {
       const access = store.state.userInfo.uniqueAuth;
-      const isPermission = includeArray(to.meta.auth, access);
-      if (isPermission) {
+      const isPermission = includeArray(to.meta.auth, access); //  判断是否有权限  TODO
+      if (access.length) {
         next();
       } else {
         if (access.length == 0) {