@@ -8,6 +8,9 @@ Vue.use(Router);
88/* layout */
99import Layout from '../views/layout/Layout' ;
1010
11+ /* view */
12+ import Login from '../views/login'
13+ import Role from '../views/role'
1114/**
1215* icon : the icon show in the sidebar
1316* hidden : if `hidden:true` will not show in the sidebar
@@ -16,7 +19,7 @@ import Layout from '../views/layout/Layout';
1619* meta : { role: ['admin'] } will control the page role
1720**/
1821export const constantRouterMap = [
19- { path : '/login' , component : _import ( 'login/index' ) , hidden : true } ,
22+ { path : '/login' , component : Login , hidden : true } ,
2023 { path : '/authredirect' , component : _import ( 'login/authredirect' ) , hidden : true } ,
2124 { path : '/404' , component : _import ( 'error/404' ) , hidden : true } ,
2225 { path : '/401' , component : _import ( 'error/401' ) , hidden : true } ,
@@ -46,14 +49,15 @@ export default new Router({
4649
4750export const asyncRouterMap = [
4851 {
49- path : '/permission ' ,
52+ path : '/crp ' ,
5053 component : Layout ,
51- redirect : '/permission/index ' ,
52- name : '权限测试 ' ,
54+ redirect : 'noredirect ' ,
55+ name : '权限管理 ' ,
5356 icon : 'quanxian' ,
54- meta : { role : [ 'admin' ] } ,
55- noDropdown : true ,
56- children : [ { path : 'index' , component : _import ( 'permission/index' ) , name : '权限测试页' , meta : { role : [ 'admin' ] } } ]
57+ // meta: { role: ['admin'] },
58+ children : [
59+ { path : 'roles' , component : Role , name : '角色管理' }
60+ ]
5761 } ,
5862 {
5963 path : '/components' ,
@@ -76,7 +80,7 @@ export const asyncRouterMap = [
7680 { path : 'backtotop' , component : _import ( 'components/backToTop' ) , name : '返回顶部' }
7781 ]
7882 } ,
79- {
83+ /* {
8084 path: '/charts',
8185 component: Layout,
8286 redirect: '/charts/index',
@@ -89,7 +93,7 @@ export const asyncRouterMap = [
8993 { path: 'line', component: _import('charts/line'), name: '折线图' },
9094 { path: 'mixchart', component: _import('charts/mixChart'), name: '混合图表' }
9195 ]
92- } ,
96+ },*/
9397 {
9498 path : '/example' ,
9599 component : Layout ,
0 commit comments