index.js 5.3 KB

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