index.js 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. import ElementUI from 'element-ui'
  4. import 'element-ui/lib/theme-chalk/index.css'
  5. import classA from '@/components/pages/class'
  6. import course from '@/components/pages/course'
  7. import courseDetail from '@/components/pages/courseDetail'
  8. import data from '@/components/pages/data'
  9. import notice from '@/components/pages/notice'
  10. import student from '@/components/pages/student'
  11. import works from '@/components/pages/works'
  12. import worksDetail from '@/components/pages/worksDetail'
  13. import login from '@/components/login'
  14. import ask from '@/components/pages/ask'
  15. import addCourse from '@/components/pages/addCourse'
  16. import library from '@/components/pages/library'
  17. import note from '@/components/pages/note'
  18. import Grid from '@/components/pages/Grid'
  19. import demo from '@/components/pages/demo'
  20. import classRoom from '@/components/pages/classRoom'
  21. import liveRoom from '@/components/pages/liveRoom'
  22. import liveRoomKQ from '@/components/pages/liveRoomKQ'
  23. import addPPt from '@/components/pages/addPPt'
  24. import studyLibrary from '@/components/pages/studyLibrary'
  25. import evaluation from '@/components/pages/evaluation'
  26. import GridList from '@/components/pages/GridList'
  27. import wordList from '@/components/pages/wordList'
  28. import demoPdf from '@/components/pages/demoPdf'
  29. import demoPdf2 from '@/components/pages/demoPdf2'
  30. import audioDemo from '@/components/pages/audioDemo'
  31. import Ttype from '@/components/pages/Ttype'
  32. import banner from '@/components/pages/banner'
  33. Vue.use(Router).use(ElementUI)
  34. export default new Router({
  35. routes: [{
  36. path: '/class',
  37. name: 'class',
  38. component: classA,
  39. meta: {
  40. requireAuth: ''
  41. }
  42. },
  43. // {
  44. // path: '/',
  45. // redirect: '/course',
  46. // },
  47. {
  48. path: '/course',
  49. component: course,
  50. meta: {
  51. requireAuth: '' // 是否需要判断是否登录,这里是需要判断
  52. }
  53. },
  54. {
  55. path: '/course/courseDetail',
  56. component: courseDetail,
  57. meta: {
  58. requireAuth: '' // 是否需要判断是否登录,这里是需要判断
  59. }
  60. },
  61. {
  62. path: '/course/addCourse',
  63. component: addCourse,
  64. meta: {
  65. requireAuth: '' // 是否需要判断是否登录,这里是需要判断
  66. }
  67. },
  68. {
  69. path: '/data',
  70. name: 'data',
  71. component: data,
  72. meta: {
  73. requireAuth: '' // 是否需要判断是否登录,这里是需要判断
  74. }
  75. }, {
  76. path: '/notice',
  77. name: 'notice',
  78. component: notice,
  79. meta: {
  80. requireAuth: '' // 是否需要判断是否登录,这里是需要判断
  81. }
  82. },
  83. {
  84. path: '/student',
  85. name: 'student',
  86. component: student,
  87. meta: {
  88. requireAuth: '' // 是否需要判断是否登录,这里是需要判断
  89. }
  90. },
  91. {
  92. path: '/ask',
  93. name: 'ask',
  94. component: ask,
  95. meta: {
  96. requireAuth: '' // 是否需要判断是否登录,这里是需要判断
  97. }
  98. },
  99. {
  100. path: '/ask/askList',
  101. name: 'askList',
  102. component: () =>
  103. import ('@/components/pages/askList'),
  104. meta: {}
  105. },
  106. {
  107. path: '/works',
  108. name: 'works',
  109. component: works,
  110. meta: {
  111. requireAuth: '' // 是否需要判断是否登录,这里是需要判断
  112. }
  113. },
  114. {
  115. path: '/worksDetail',
  116. name: 'worksDetail',
  117. component: worksDetail,
  118. meta: {
  119. requireAuth: '' // 是否需要判断是否登录,这里是需要判断
  120. }
  121. },
  122. {
  123. path: '/library',
  124. name: 'library',
  125. component: library,
  126. meta: {
  127. requireAuth: '' // 是否需要判断是否登录,这里是需要判断
  128. }
  129. },
  130. {
  131. path: '/login',
  132. name: 'login',
  133. component: login,
  134. meta: {
  135. requireAuth: '' // 不需要鉴权
  136. }
  137. },
  138. {
  139. path: '/note',
  140. name: 'note',
  141. component: note,
  142. meta: {
  143. requireAuth: '' // 不需要鉴权
  144. }
  145. },
  146. {
  147. path: '/Grid',
  148. name: 'Grid',
  149. component: Grid,
  150. meta: {
  151. requireAuth: '' // 不需要鉴权
  152. }
  153. },
  154. {
  155. path: '/demo',
  156. name: 'demo',
  157. component: demo,
  158. meta: {
  159. requireAuth: '' // 不需要鉴权
  160. }
  161. },
  162. {
  163. path: '/classRoom',
  164. name: 'classRoom',
  165. component: classRoom,
  166. meta: {
  167. requireAuth: '' // 不需要鉴权
  168. }
  169. },
  170. {
  171. path: '/liveRoom',
  172. name: 'liveRoom',
  173. component: liveRoom,
  174. meta: {
  175. requireAuth: '' // 不需要鉴权
  176. }
  177. }, {
  178. path: '/liveRoomKQ',
  179. name: 'liveRoomKQ',
  180. component: liveRoomKQ,
  181. meta: {
  182. requireAuth: '' // 不需要鉴权
  183. }
  184. },
  185. {
  186. path: '/addPPt',
  187. name: 'addPPt',
  188. component: addPPt,
  189. meta: {
  190. requireAuth: '' // 不需要鉴权
  191. }
  192. },
  193. {
  194. path: '/studyLibrary',
  195. name: 'studyLibrary',
  196. component: studyLibrary,
  197. meta: {
  198. requireAuth: '' // 不需要鉴权
  199. }
  200. },
  201. {
  202. path: '/evaluation',
  203. name: 'evaluation',
  204. component: evaluation,
  205. meta: {
  206. requireAuth: '' // 不需要鉴权
  207. }
  208. },
  209. {
  210. path: '/GridList',
  211. name: 'GridList',
  212. component: GridList,
  213. meta: {
  214. requireAuth: '' // 不需要鉴权
  215. }
  216. },
  217. {
  218. path: '/wordList',
  219. name: 'wordList',
  220. component: wordList,
  221. meta: {
  222. requireAuth: '' // 不需要鉴权
  223. }
  224. }, {
  225. path: '/demoPdf',
  226. name: 'demoPdf',
  227. component: demoPdf,
  228. meta: {
  229. requireAuth: '' // 不需要鉴权
  230. }
  231. }, {
  232. path: '/demoPdf2',
  233. name: 'demoPdf2',
  234. component: demoPdf2,
  235. meta: {
  236. requireAuth: '' // 不需要鉴权
  237. }
  238. }, {
  239. path: '/audioDemo',
  240. name: 'audioDemo',
  241. component: audioDemo,
  242. meta: {
  243. requireAuth: '' // 不需要鉴权
  244. }
  245. }, {
  246. path: '/Ttype',
  247. name: 'Ttype',
  248. component: Ttype,
  249. meta: {
  250. requireAuth: '' // 不需要鉴权
  251. }
  252. }, {
  253. path: '/banner',
  254. name: 'banner',
  255. component: banner,
  256. meta: {
  257. requireAuth: '' // 不需要鉴权
  258. }
  259. },
  260. ]
  261. })