index.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import Vue from 'vue'
  2. import VueRouter from 'vue-router'
  3. import Index from '../views/learn-center/index.vue'
  4. Vue.use(VueRouter)
  5. const routes = [{
  6. path: '/',
  7. redirect: '/EnterSys'
  8. },
  9. // 教培中心
  10. {
  11. path: '/EnterSys',
  12. name: 'Index',
  13. component: Index
  14. },
  15. {
  16. path: '/login',
  17. name: 'login',
  18. component: () =>
  19. import('../views/login.vue'),
  20. },
  21. {
  22. path: '/learnCenterIndex',
  23. name: 'learnCenterIndex',
  24. component: () =>
  25. import('../views/learn-center/index.vue')
  26. },
  27. {
  28. path: '/learncenter/ListPage',
  29. name: 'learnCenterListpage',
  30. component: () =>
  31. import('../views/learn-center/ListPage.vue')
  32. },
  33. {
  34. path: '/learncenter/TextbookDetail',
  35. name: 'learnCenterTextbookDetail',
  36. component: () =>
  37. import('../views/learn-center/TextbookDetail.vue')
  38. },
  39. {
  40. path: '/learncenter/CourseDetail',
  41. name: 'learnCenterCourseDetail',
  42. component: () =>
  43. import('../views/learn-center/CourseDetail.vue')
  44. },
  45. {
  46. path: '/learncenter/Seekresult',
  47. name: 'learnCenterSeekresult',
  48. component: () =>
  49. import('../views/learn-center/Seekresult.vue')
  50. },
  51. {
  52. path: '/learncenter/Learnresource',
  53. name: 'learnCenterLearnresource',
  54. component: () =>
  55. import('../views/learn-center/Learnresource.vue')
  56. },
  57. {
  58. path: '/404',
  59. component: () =>
  60. import('@/views/404'),
  61. hidden: true
  62. },
  63. // 404 page must be placed at the end !!!
  64. { path: '*', redirect: '/', hidden: true }
  65. ]
  66. const createRouter = () => new VueRouter({
  67. //mode: 'history', // require service support
  68. scrollBehavior: () => ({ y: 0 }),
  69. routes: routes
  70. })
  71. const router = createRouter()
  72. export default router