index.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. },
  62. ];
  63. const router = new VueRouter({
  64. mode: 'history',
  65. base: process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROOT_URL + 'center',
  66. routes,
  67. });
  68. export default router;