Skip to content

Commit afe9663

Browse files
committed
fix(view): routeSuper
1 parent bc9b5fe commit afe9663

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

admin/src/permission.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import router from './router'
2-
import { routeManage, routerAdmin } from './router/router'
2+
import { routeSuper, routerAdmin } from './router/router'
33
import store from './store'
44
import NProgress from 'nprogress' // Progress 进度条
55
import 'nprogress/nprogress.css'// Progress 进度条样式
@@ -8,7 +8,7 @@ import { getToken } from '@/utils/auth' // 验权
88

99
console.log(router)
1010
router.addRoutes(routerAdmin)
11-
router.addRoutes(routeManage)
11+
router.addRoutes(routeSuper)
1212
const whiteList = ['/login', '/index', '/line', '/home', '/404', '/', '', '/md'] // 不重定向白名单
1313
router.beforeEach((to, from, next) => {
1414
NProgress.start()

admin/src/router/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const routeBase = [
4646
}
4747
]
4848

49-
const routeOther = [
49+
const routeTest = [
5050
{
5151
path: '/form',
5252
component: Layout,
@@ -119,7 +119,7 @@ const routeOther = [
119119
{ path: '*', redirect: '/404', hidden: true }
120120
]
121121

122-
export const constantRouterMap = [...routeBase, ...routeOther]
122+
export const constantRouterMap = [...routeBase, ...routeTest]
123123

124124
export default new Router({
125125
// mode: 'history', //后端支持可开

admin/src/router/router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const Super = 'Super Administrator'
1717
const Admin = 'Admin'
1818

1919
// 管理一般路由
20-
export const routeManage = [
20+
export const routeSuper = [
2121
{
2222
path: '/api_excel',
2323
component: Layout,

admin/src/store/modules/user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { login, logout, getInfo } from '@/api/login'
22
import { getToken, setToken, removeToken } from '@/utils/auth'
3-
import { routeManage, routerAdmin, routeOther } from '../../router/router'
3+
import { routeSuper, routerAdmin, routeOther } from '../../router/router'
44

55
const user = {
66
state: {
@@ -91,9 +91,9 @@ const user = {
9191
let userLimitRouters = null
9292
// console.log(data)
9393
if (data.roles.indexOf('Super Administrator') >= 0) {
94-
userLimitRouters = [...routerAdmin, ...routeManage, ...routeOther]
94+
userLimitRouters = [...routerAdmin, ...routeSuper, ...routeOther]
9595
} else if (data.roles.indexOf('Admin') >= 0) {
96-
userLimitRouters = routeManage
96+
userLimitRouters = routeSuper
9797
} else {
9898
userLimitRouters = routeOther
9999
}

0 commit comments

Comments
 (0)