index.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. import Vue from 'vue';
  2. import VueRouter from 'vue-router';
  3. Vue.use(VueRouter);
  4. const routes = [
  5. {
  6. path: '/',
  7. name: 'frame',
  8. component: () => import('@/views/index.vue'),
  9. children: [
  10. {
  11. path: '/list',
  12. name: 'test_list',
  13. component: () => import('@/views/test/list.vue'),
  14. },
  15. {
  16. path: '/detail',
  17. name: 'test_detail',
  18. component: () => import('@/views/test/detail.vue'),
  19. },
  20. {
  21. path: '/itembank/detail',
  22. name: 'teacher_detail',
  23. component: () => import('@/views/Itembank/detail.vue'),
  24. },
  25. {
  26. path: '/itembank/index',
  27. name: 'index_index',
  28. component: () => import('@/views/Itembank/index.vue'),
  29. },
  30. {
  31. path: '/questionnaire/index',
  32. name: 'index_index',
  33. component: () => import('@/views/questionnaire/index.vue'),
  34. },
  35. {
  36. path: '/questionnaire/detail',
  37. name: 'teacher_detail',
  38. component: () => import('@/views/questionnaire/detail.vue'),
  39. },
  40. {
  41. path: '/teacher/detail',
  42. name: 'teacher_detail',
  43. component: () => import('@/views/teacher/detail.vue'),
  44. },
  45. {
  46. path: '/teacher/index',
  47. name: 'index_index',
  48. component: () => import('@/views/teacher/index.vue'),
  49. },
  50. {
  51. path: '/work/detail',
  52. name: 'teacher_detail',
  53. component: () => import('@/views/work/detail.vue'),
  54. },
  55. {
  56. path: '/work/index',
  57. name: 'index_index',
  58. component: () => import('@/views/work/index.vue'),
  59. },
  60. {
  61. path: '/subject/index',
  62. name: 'index_index',
  63. component: () => import('@/views/subject/index.vue'),
  64. },
  65. {
  66. path: '/subject/detail',
  67. name: 'teacher_detail',
  68. component: () => import('@/views/subject/detail.vue'),
  69. },
  70. ],
  71. },
  72. ];
  73. const router = new VueRouter({
  74. mode: 'history',
  75. base: process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROOT_URL + 'center',
  76. routes,
  77. });
  78. export default router;