index.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import Vue from 'vue';
  2. import Router from 'vue-router';
  3. Vue.use(Router);
  4. export default new Router({
  5. mode: 'history',
  6. base: process.env.NODE_ENV === 'development' ? '' : 'study',
  7. routes: [
  8. {
  9. path: '/',
  10. redirect: '/homeIndex',
  11. },
  12. {
  13. path: '/',
  14. component: () => import('../components/common/Home.vue'),
  15. meta: { title: '自述文件' },
  16. children: [
  17. {
  18. path: '/homeIndex',
  19. component: () => import('../views/homeIndex.vue'),
  20. meta: { title: '系统首页' },
  21. },
  22. // 管理员
  23. {
  24. path: '/gly',
  25. component: () => import('../views/gly/index.vue'),
  26. meta: { title: '管理员管理' },
  27. },
  28. {
  29. path: '/gly/detail',
  30. component: () => import('../views/gly/detail.vue'),
  31. meta: { title: '管理员信息管理' },
  32. },
  33. // 机构管理员
  34. {
  35. path: '/jg',
  36. component: () => import('../views/jg/index.vue'),
  37. meta: { title: '机构管理员' },
  38. },
  39. {
  40. path: '/jg/detail',
  41. component: () => import('../views/jg/detail.vue'),
  42. meta: { title: '机构管理员信息管理' },
  43. },
  44. // 业务管理员
  45. {
  46. path: '/yw',
  47. component: () => import('../views/yw/index.vue'),
  48. meta: { title: '业务管理员' },
  49. },
  50. {
  51. path: '/yw/detail',
  52. component: () => import('../views/yw/detail.vue'),
  53. meta: { title: '业务管理员信息管理' },
  54. },
  55. // 用户管理
  56. {
  57. path: '/user',
  58. component: () => import('../views/user/index.vue'),
  59. meta: { title: '用户管理' },
  60. },
  61. ],
  62. },
  63. {
  64. path: '/login',
  65. component: () => import('../views/Login.vue'),
  66. meta: { title: '登录' },
  67. },
  68. {
  69. path: '*',
  70. redirect: '/404',
  71. },
  72. ],
  73. });