From-wh 2 лет назад
Родитель
Сommit
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) {