From b9d3d185d050ec0a2bfd36146504f173b5e303a9 Mon Sep 17 00:00:00 2001 From: zouzhibing Date: Sat, 2 Apr 2022 10:46:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/index.html | 2 +- src/store/modules/permission.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.html b/dist/index.html index cf8d0c0..6ea38a7 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1 +1 @@ -admin3
\ No newline at end of file +admin3
\ No newline at end of file diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts index c41b934..b1e814a 100644 --- a/src/store/modules/permission.ts +++ b/src/store/modules/permission.ts @@ -57,7 +57,7 @@ const actions = { return new Promise(resolve => { // 在这判断是否有权限,哪些角色拥有哪些权限 let accessedRoutes - if (roles&&roles.length) { + if (roles&&roles.length&&!roles.includes('admin')) { accessedRoutes = filterAsyncRoutes(asyncRoutes, roles) } else { accessedRoutes = asyncRoutes || []