routes-student.ts 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. import Auth from '@/student/layout/auth'
  2. import { router, rootRouter } from './routes-common'
  3. type metaType = {
  4. isRegister: boolean
  5. }
  6. const noLoginRouter = [
  7. {
  8. path: '/share-music-sheet',
  9. name: 'share-music-sheet',
  10. component: () => import('@/teacher/share-page/share-music-sheet/index'),
  11. meta: {
  12. title: '分享乐曲'
  13. }
  14. },
  15. {
  16. path: '/leaderboard',
  17. component: () => import('@/student/leaderboard/index'),
  18. meta: {
  19. title: '曲目挑战排行榜'
  20. // isExternal: true // 是否外部浏览器可以打开
  21. }
  22. }
  23. ]
  24. export default [
  25. {
  26. path: '/',
  27. component: Auth,
  28. children: [
  29. ...router,
  30. {
  31. path: '/login',
  32. name: 'login',
  33. component: () => import('@/student/layout/login'),
  34. meta: {
  35. isRegister: false
  36. } as metaType
  37. },
  38. {
  39. path: '/home',
  40. name: 'home',
  41. component: () => import('@/student/home/index')
  42. },
  43. {
  44. path: '/practiceClass',
  45. name: 'practiceClass',
  46. component: () => import('@/student/practice-class/index'),
  47. meta: {
  48. title: '陪练课'
  49. }
  50. },
  51. {
  52. path: '/videoDetail',
  53. name: 'videoDetail',
  54. component: () => import('@/student/video-class/video-detail'),
  55. meta: {
  56. title: '视频课'
  57. }
  58. },
  59. {
  60. path: '/videoClassDetail',
  61. name: 'videoClassDetail',
  62. component: () => import('@/student/video-class/video-class-detail'),
  63. meta: {
  64. title: '视频课详情'
  65. }
  66. },
  67. {
  68. path: '/liveDetail',
  69. name: 'liveDetail',
  70. component: () => import('@/student/live-class/live-detail'),
  71. meta: {
  72. title: '直播课详情'
  73. }
  74. },
  75. {
  76. path: '/memberRecord',
  77. name: 'memberRecord',
  78. component: () => import('@/student/member-center/member-record'),
  79. meta: {
  80. title: '训练统计'
  81. }
  82. },
  83. {
  84. path: '/tradeRecord',
  85. name: 'tradeRecord',
  86. component: () => import('@/student/trade/index'),
  87. meta: {
  88. title: '交易记录'
  89. }
  90. },
  91. {
  92. path: '/teacherHome',
  93. name: 'teacherHome',
  94. component: () => import('@/student/teacher-dependent/teacher-home'),
  95. meta: {
  96. title: '老师主页'
  97. }
  98. },
  99. {
  100. path: '/teacherElegant',
  101. name: 'teacherElegant',
  102. component: () => import('@/student/teacher-dependent/teacher-elegant'),
  103. meta: {
  104. title: '老师风采'
  105. }
  106. },
  107. {
  108. path: '/music-upload',
  109. component: () => import('@/teacher/music/upload'),
  110. meta: {
  111. title: '上传曲谱'
  112. }
  113. },
  114. {
  115. path: '/teacherFollow',
  116. component: () => import('@/student/teacher-dependent/teacher-follow'),
  117. meta: {
  118. title: '我的关注'
  119. }
  120. },
  121. {
  122. path: '/track-review-activity',
  123. component: () =>
  124. import('@/student/share-active/track-review-activity/index'),
  125. meta: {
  126. title: '曲目评测活动',
  127. isExternal: true // 是否外部浏览器可以打开
  128. }
  129. },
  130. {
  131. path: '/track-song',
  132. component: () =>
  133. import('@/student/share-active/track-review-activity/track-song'),
  134. meta: {
  135. title: '评测曲目'
  136. }
  137. }
  138. ]
  139. },
  140. ...noLoginRouter,
  141. ...rootRouter,
  142. {
  143. path: '/inviteTeacher',
  144. name: 'inviteTeacher',
  145. component: () => import('@/student/invite-teacher/index'),
  146. meta: {
  147. title: '邀请学员'
  148. }
  149. },
  150. {
  151. path: '/inviteSuccess',
  152. name: 'inviteSuccess',
  153. component: () => import('@/student/invite-teacher/invite-success'),
  154. meta: {
  155. title: '注册成功'
  156. }
  157. },
  158. {
  159. path: '/transfer',
  160. component: () => import('@/student/down-load/transfer'),
  161. meta: {
  162. title: '酷乐秀学院'
  163. }
  164. },
  165. {
  166. path: '/download',
  167. component: () => import('@/student/down-load/download')
  168. },
  169. {
  170. path: '/:pathMatch(.*)*',
  171. component: () => import('@/views/404'),
  172. meta: {
  173. title: '404 Not Fund',
  174. platform: 'STUDENT'
  175. }
  176. }
  177. ]