index.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. import login from '@/containers/login/login'
  4. // import Register from '@/containers/register/registation'
  5. import Register from '@/containers/register/register.vue'
  6. import NewInfo from '@/containers/post/info.vue'
  7. import Reset from '@/containers/reset/reset'
  8. import main from '@/containers/main/main'
  9. import center from '@/containers/center/center'
  10. import Play from '@/containers/center/play/index.vue'
  11. import Index from '@/containers/main/index/index'
  12. import Profile from '@/containers/main/profile/profile'
  13. import Apply from '@/containers/main/apply/apply'
  14. import PostList from '@/containers/main/post/list'
  15. import PostInfo from '@/containers/main/post/info'
  16. import HelpList from '@/containers/main/help/list'
  17. import AboutMe from '@/containers/main/about/aboutMe'
  18. import Verify from '@/containers/main/verify/index'
  19. import CenterHome from '@/containers/center/home/index'
  20. import CenterSetting from '@/containers/center/setting/index'
  21. import CenterTrain from '@/containers/center/class/train/index'
  22. import CenterOffline from '@/containers/center/class/offline/index'
  23. import CenterStudyArchives from '@/containers/center/studyArchives/index'
  24. import CenterMyNotes from '@/containers/center/myNotes/index'
  25. import CenterMyOrder from '@/containers/center/myOrder/index'
  26. import CenterMessage from '@/containers/center/message/index'
  27. import CenterSign from '@/containers/center/sign/index'
  28. import CenterMarket from '@/containers/center/market/index'
  29. import CenterExam from '@/containers/center/exam/index'
  30. Vue.use(Router)
  31. export default new Router({
  32. routes: [{
  33. path: '/',
  34. name: 'login',
  35. component: login,
  36. },
  37. {
  38. path: '/register',
  39. name: 'register',
  40. component: Register,
  41. },
  42. {
  43. path: '/news',
  44. name: 'news',
  45. component: NewInfo,
  46. },
  47. {
  48. path: '/reset',
  49. name: 'reset',
  50. component: Reset,
  51. },
  52. {
  53. path: '/main',
  54. name: 'main',
  55. component: main,
  56. children: [{
  57. path: 'index',
  58. component: Index,
  59. },
  60. {
  61. path: 'about',
  62. component: AboutMe,
  63. },
  64. {
  65. path: 'profile',
  66. component: Profile,
  67. },
  68. {
  69. path: 'apply',
  70. component: Apply,
  71. },
  72. {
  73. path: 'postlist/:type',
  74. component: PostList,
  75. },
  76. {
  77. path: 'post/:postId',
  78. component: PostInfo,
  79. },
  80. {
  81. path: 'help',
  82. component: HelpList,
  83. },
  84. {
  85. path: 'verify',
  86. component: Verify,
  87. }
  88. ]
  89. },
  90. {
  91. path: '/center',
  92. name: 'center',
  93. component: center,
  94. children: [{
  95. path: 'home',
  96. component: CenterHome,
  97. },
  98. {
  99. path: 'class/train',
  100. component: CenterTrain,
  101. },
  102. {
  103. path: 'class/offline',
  104. component: CenterOffline,
  105. },
  106. {
  107. path: 'play/:courseId',
  108. name: 'play',
  109. component: Play,
  110. },
  111. {
  112. path: 'studyArchives',
  113. component: CenterStudyArchives,
  114. },
  115. {
  116. path: 'myOrder',
  117. component: CenterMyOrder,
  118. },
  119. {
  120. path: 'myNotes',
  121. component: CenterMyNotes,
  122. },
  123. {
  124. path: 'message',
  125. component: CenterMessage,
  126. },
  127. {
  128. path: 'exam/:courseId',
  129. component: CenterExam,
  130. },
  131. {
  132. path: 'market',
  133. component: CenterMarket,
  134. },
  135. {
  136. path: 'sign',
  137. component: CenterSign,
  138. },
  139. {
  140. path: 'setting',
  141. component: CenterSetting,
  142. }
  143. ],
  144. }
  145. ]
  146. })