@@ -21,8 +21,9 @@ const Layout = () => import('../views/layout/Layout')
21
21
icon: 'svg-name' the icon show in the sidebar,
22
22
}
23
23
**/
24
- export const constantRouterMap = [
25
- // { path: '/', redirect: '/index', hidden: true },
24
+
25
+ // 基础路由
26
+ const routeBase = [
26
27
{ path : '/' , name : 'index' , component : ( ) => import ( '@/views/home/index' ) , hidden : true } ,
27
28
{ path : '/line' , name : 'line' , component : ( ) => import ( '@/views/home/line' ) , hidden : true } ,
28
29
{ path : '/home' , component : ( ) => import ( '@/views/home/home' ) , hidden : true } ,
@@ -42,8 +43,11 @@ export const constantRouterMap = [
42
43
path : 'dashboard' ,
43
44
component : ( ) => import ( '@/views/dashboard/index' )
44
45
} ]
45
- } ,
46
+ }
47
+ ]
46
48
49
+ // 管理一般路由
50
+ const routeManage = [
47
51
{
48
52
path : '/api_excel' ,
49
53
component : Layout ,
@@ -73,7 +77,11 @@ export const constantRouterMap = [
73
77
meta : { title : '接口列表' , icon : 'api' }
74
78
}
75
79
]
76
- } ,
80
+ }
81
+ ]
82
+
83
+ const routerAdmin = [
84
+ // { path: '/', redirect: '/index', hidden: true },
77
85
78
86
{
79
87
path : '/category' ,
@@ -207,8 +215,11 @@ export const constantRouterMap = [
207
215
meta : { title : '角色管理' , icon : 'role' }
208
216
}
209
217
]
210
- } ,
218
+ }
211
219
220
+ ]
221
+
222
+ const routeOther = [
212
223
{
213
224
path : '/form' ,
214
225
component : Layout ,
@@ -221,7 +232,6 @@ export const constantRouterMap = [
221
232
}
222
233
] , hidden : true
223
234
} ,
224
-
225
235
{
226
236
path : '/nested' ,
227
237
component : Layout ,
@@ -282,6 +292,8 @@ export const constantRouterMap = [
282
292
{ path : '*' , redirect : '/404' , hidden : true }
283
293
]
284
294
295
+ export const constantRouterMap = [ ...routeBase , ...routeManage , ...routerAdmin , ...routeOther ]
296
+
285
297
export default new Router ( {
286
298
// mode: 'history', //后端支持可开
287
299
scrollBehavior : ( ) => ( { y : 0 } ) ,
0 commit comments