index.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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 PublicSign from '@/containers/sign/index'
  29. import CenterMarket from '@/containers/center/market/index'
  30. import CenterExam from '@/containers/center/exam/index'
  31. import CenterExamTest from '@/containers/center/exam/indexTest'
  32. import CenterUserSeat from '@/containers/center/userSeat/index'
  33. Vue.use(Router)
  34. export default new Router({
  35. routes: [{
  36. path: '/',
  37. name: 'login',
  38. component: login,
  39. },
  40. {
  41. path: '/register',
  42. name: 'register',
  43. component: Register,
  44. },
  45. {
  46. path: '/sign',
  47. name: 'sign',
  48. component: PublicSign,
  49. },
  50. {
  51. path: '/news',
  52. name: 'news',
  53. component: NewInfo,
  54. },
  55. {
  56. path: '/reset',
  57. name: 'reset',
  58. component: Reset,
  59. },
  60. {
  61. path: '/main',
  62. name: 'main',
  63. component: main,
  64. children: [{
  65. path: 'index',
  66. component: Index,
  67. },
  68. {
  69. path: 'about',
  70. component: AboutMe,
  71. },
  72. {
  73. path: 'profile',
  74. component: Profile,
  75. },
  76. {
  77. path: 'apply',
  78. component: Apply,
  79. },
  80. {
  81. path: 'postlist/:type',
  82. component: PostList,
  83. },
  84. {
  85. path: 'post/:postId',
  86. component: PostInfo,
  87. },
  88. {
  89. path: 'help',
  90. component: HelpList,
  91. },
  92. {
  93. path: 'verify',
  94. component: Verify,
  95. }
  96. ]
  97. },
  98. {
  99. path: '/center',
  100. name: 'center',
  101. component: center,
  102. children: [{
  103. path: 'home',
  104. component: CenterHome,
  105. },
  106. {
  107. path: 'class/train',
  108. component: CenterTrain,
  109. },
  110. {
  111. path: 'class/offline',
  112. component: CenterOffline,
  113. },
  114. {
  115. path: 'play/:courseId',
  116. name: 'play',
  117. component: Play,
  118. },
  119. {
  120. path: 'studyArchives',
  121. component: CenterStudyArchives,
  122. },
  123. {
  124. path: 'myOrder',
  125. component: CenterMyOrder,
  126. },
  127. {
  128. path: 'myNotes',
  129. component: CenterMyNotes,
  130. },
  131. {
  132. path: 'message',
  133. component: CenterMessage,
  134. },
  135. {
  136. path: 'examTest/:courseId',
  137. component: CenterExam,
  138. },
  139. {
  140. path: 'exam/:courseId',
  141. component: CenterExamTest,
  142. },
  143. {
  144. path: 'market',
  145. component: CenterMarket,
  146. },
  147. {
  148. path: 'sign',
  149. component: CenterSign,
  150. },
  151. {
  152. path: 'setting',
  153. component: CenterSetting,
  154. },
  155. {
  156. path: 'seat',
  157. component: CenterUserSeat,
  158. },
  159. ],
  160. }
  161. ]
  162. })