index.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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 PublicApply from '@/containers/apply/index'
  29. import PublicSign from '@/containers/sign/index'
  30. import PublicWeixin from '@/containers/weixin/index'
  31. import CenterMarket from '@/containers/center/market/index'
  32. import CenterTrainMarket from '@/containers/center/market/trainIndex'
  33. import CenterExam from '@/containers/center/exam/index'
  34. import CenterExamTest from '@/containers/center/exam/indexTest'
  35. import CenterExamScore from '@/containers/center/exam/score'
  36. import CenterExamDownload from '@/containers/center/exam/download'
  37. import CenterUserSeat from '@/containers/center/userSeat/index'
  38. import CenterUserCert from '@/containers/center/userCert/index'
  39. import PublicCertificate from '@/containers/certificate/index'
  40. Vue.use(Router)
  41. export default new Router({
  42. routes: [{
  43. path: '/',
  44. name: 'login',
  45. meta:{
  46. keepAlive: true,
  47. },
  48. component: login,
  49. },
  50. {
  51. path: '/register',
  52. name: 'register',
  53. component: Register,
  54. },
  55. {
  56. path: '/sm-sign',
  57. name: 'sm-sign',
  58. component: PublicCertificate,
  59. },
  60. {
  61. path: '/sign',
  62. name: 'sign',
  63. component: PublicSign,
  64. },
  65. {
  66. path: '/apply',
  67. name: 'apply',
  68. component: PublicApply,
  69. },
  70. {
  71. path: '/weixin',
  72. name: 'weixin',
  73. component: PublicWeixin,
  74. },
  75. {
  76. path: '/news',
  77. name: 'news',
  78. component: NewInfo,
  79. },
  80. {
  81. path: '/reset',
  82. name: 'reset',
  83. component: Reset,
  84. },
  85. {
  86. path: '/main',
  87. name: 'main',
  88. component: main,
  89. children: [{
  90. path: 'index',
  91. component: Index,
  92. },
  93. {
  94. path: 'about',
  95. component: AboutMe,
  96. },
  97. {
  98. path: 'profile',
  99. component: Profile,
  100. },
  101. {
  102. path: 'apply',
  103. component: Apply,
  104. },
  105. {
  106. path: 'postlist/:type',
  107. component: PostList,
  108. },
  109. {
  110. path: 'post/:postId',
  111. component: PostInfo,
  112. },
  113. {
  114. path: 'help',
  115. component: HelpList,
  116. },
  117. {
  118. path: 'verify',
  119. component: Verify,
  120. }
  121. ]
  122. },
  123. {
  124. path: '/center',
  125. name: 'center',
  126. component: center,
  127. children: [{
  128. path: 'home',
  129. component: CenterHome,
  130. },
  131. {
  132. path: 'class/train',
  133. component: CenterTrain,
  134. },
  135. {
  136. path: 'class/offline',
  137. component: CenterOffline,
  138. },
  139. {
  140. path: 'play/:courseId',
  141. name: 'play',
  142. component: Play,
  143. },
  144. {
  145. path: 'studyArchives',
  146. component: CenterStudyArchives,
  147. },
  148. {
  149. path: 'myOrder',
  150. component: CenterMyOrder,
  151. },
  152. {
  153. path: 'myNotes',
  154. component: CenterMyNotes,
  155. },
  156. {
  157. path: 'message',
  158. component: CenterMessage,
  159. },
  160. {
  161. path: 'examTest/:courseId',
  162. component: CenterExam,
  163. },
  164. {
  165. path: 'exam/:courseId',
  166. component: CenterExamTest,
  167. },
  168. {
  169. path: 'market',
  170. component: CenterMarket,
  171. },
  172. {
  173. path: 'trainMarket',
  174. component: CenterTrainMarket,
  175. },
  176. {
  177. path: 'sign',
  178. component: CenterSign,
  179. },
  180. {
  181. path: 'setting',
  182. component: CenterSetting,
  183. },
  184. {
  185. path: 'examSeat',
  186. component: CenterUserSeat,
  187. },
  188. {
  189. path: 'examScore',
  190. component: CenterExamScore,
  191. },
  192. {
  193. path: 'examDownload',
  194. component: CenterExamDownload,
  195. },
  196. {
  197. path: 'userCert',
  198. component: CenterUserCert
  199. }
  200. ],
  201. }
  202. ]
  203. })