mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-30 14:31:04 +00:00
improve: 鉴权
This commit is contained in:
parent
bcd01d77e2
commit
8e84eaf838
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user