routes-teacher.ts 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. import Auth from '@/teacher/layout/auth'
  2. import { router, rootRouter } from './routes-common'
  3. type metaType = {
  4. isRegister: boolean
  5. }
  6. // 不需要登录的路由
  7. const noLoginRouter = [
  8. {
  9. path: '/shareVideo',
  10. name: 'shareVideo',
  11. component: () => import('@/teacher/share-page/share-video/index'),
  12. meta: {
  13. title: '分享视频课'
  14. }
  15. },
  16. {
  17. path: '/shareLive',
  18. name: 'shareLive',
  19. component: () => import('@/teacher/share-page/share-live/index'),
  20. meta: {
  21. title: '分享直播课'
  22. }
  23. },
  24. {
  25. path: '/shareMall',
  26. name: 'shareMall',
  27. component: () => import('@/teacher/share-page/share-mall/index'),
  28. meta: {
  29. title: '分享商品'
  30. }
  31. },
  32. {
  33. path: '/shareVip',
  34. name: 'shareVip',
  35. component: () => import('@/teacher/share-page/share-vip/index'),
  36. meta: {
  37. title: '会员中心'
  38. }
  39. },
  40. {
  41. path: '/shareAblum',
  42. name: 'shareAblum',
  43. component: () => import('@/teacher/share-page/share-album/index'),
  44. meta: {
  45. title: '分享专辑'
  46. }
  47. },
  48. {
  49. path: '/shareMusic',
  50. name: 'shareMusic',
  51. component: () => import('@/teacher/share-page/share-music/index'),
  52. meta: {
  53. title: '分享曲谱'
  54. }
  55. }
  56. ]
  57. export default [
  58. {
  59. path: '/',
  60. component: Auth,
  61. children: [
  62. ...router,
  63. {
  64. path: '/login',
  65. name: 'login',
  66. component: () => import('@/teacher/layout/login'),
  67. meta: {
  68. isRegister: false
  69. } as metaType
  70. },
  71. {
  72. path: '/home',
  73. name: 'home',
  74. component: () => import('@/teacher/home/index')
  75. },
  76. {
  77. path: '/teacherCert',
  78. name: 'teacherCert',
  79. component: () => import('@/teacher/teacher-cert/index'),
  80. meta: {
  81. title: '达人认证'
  82. }
  83. },
  84. {
  85. path: '/teacherCertUpdate',
  86. name: 'teacherCertUpdate',
  87. component: () =>
  88. import('@/teacher/teacher-cert/teacher-cert-update/index'),
  89. meta: {
  90. title: '资料修改'
  91. }
  92. },
  93. {
  94. path: '/music-upload',
  95. component: () => import('@/teacher/music/upload'),
  96. meta: {
  97. title: '上传曲谱'
  98. }
  99. },
  100. {
  101. path: '/music-upload/:id/edit',
  102. component: () => import('@/teacher/music/upload'),
  103. meta: {
  104. title: '修改曲谱'
  105. }
  106. },
  107. // {
  108. // path: '/music-list',
  109. // component: () => import('@/teacher/music/list/switch'),
  110. // meta: {
  111. // title: '曲谱列表'
  112. // }
  113. // },
  114. {
  115. path: '/review-list',
  116. component: () => import('@/teacher/review/list'),
  117. meta: {
  118. title: '曲谱审核列表'
  119. }
  120. },
  121. {
  122. path: '/review/:id',
  123. component: () => import('@/teacher/review/detail'),
  124. meta: {
  125. title: '曲谱审核详情'
  126. }
  127. },
  128. {
  129. path: '/openLive',
  130. name: 'openLive',
  131. component: () => import('@/teacher/open-live/index'),
  132. meta: {
  133. title: '开通直播'
  134. }
  135. },
  136. {
  137. path: '/liveDetail',
  138. name: 'liveDetail',
  139. component: () => import('@/teacher/live-class/live-detail'),
  140. meta: {
  141. title: '直播课详情'
  142. }
  143. },
  144. {
  145. path: '/musicCert',
  146. name: 'musicCert',
  147. component: () => import('@/teacher/music-cert/index'),
  148. meta: {
  149. title: '音乐人认证'
  150. }
  151. },
  152. {
  153. path: '/videoCreate',
  154. name: 'videoCreate',
  155. component: () => import('@/teacher/video-class/create'),
  156. meta: {
  157. title: '创建视频课'
  158. }
  159. },
  160. {
  161. path: '/videoDetail',
  162. name: 'videoDetail',
  163. component: () => import('@/teacher/video-class/video-detail'),
  164. meta: {
  165. title: '视频课详情'
  166. }
  167. },
  168. {
  169. path: '/videoClassDetail',
  170. name: 'videoClassDetail',
  171. component: () => import('@/teacher/video-class/video-class-detail'),
  172. meta: {
  173. title: '视频课详情'
  174. }
  175. },
  176. {
  177. path: '/liveCreate',
  178. name: 'liveCreate',
  179. component: () => import('@/teacher/live-class/create'),
  180. meta: {
  181. title: '创建直播课'
  182. }
  183. },
  184. {
  185. path: '/practiceSetting',
  186. name: 'practiceSetting',
  187. component: () => import('@/teacher/practice-class/practice-setting'),
  188. meta: {
  189. title: '陪练课设置'
  190. }
  191. },
  192. {
  193. path: '/myFans',
  194. name: 'myFans',
  195. component: () => import('@/teacher/my-fans/index'),
  196. meta: {
  197. title: '我的粉丝'
  198. }
  199. },
  200. {
  201. path: '/pianoRoom',
  202. name: 'pianoRoom',
  203. component: () => import('@/teacher/piano-room/index'),
  204. meta: {
  205. title: '云酷琴房'
  206. }
  207. },
  208. {
  209. path: '/courseRecord',
  210. name: 'courseRecord',
  211. component: () => import('@/teacher/piano-room/course-record'),
  212. meta: {
  213. title: '课程记录'
  214. }
  215. },
  216. {
  217. path: '/accountRechargeTimer',
  218. name: 'accountRechargeTimer',
  219. component: () => import('@/teacher/piano-room/account-recharge-timer'),
  220. meta: {
  221. title: '账户充值'
  222. }
  223. },
  224. {
  225. path: '/myStudent',
  226. name: 'myStudent',
  227. component: () => import('@/teacher/piano-room/my-student'),
  228. meta: {
  229. title: '我的学员'
  230. }
  231. },
  232. {
  233. path: '/classArrangement',
  234. name: 'classArrangement',
  235. component: () => import('@/teacher/piano-room/class-arrangement'),
  236. meta: {
  237. title: '排课'
  238. }
  239. },
  240. {
  241. path: '/createClass',
  242. name: 'createClass',
  243. component: () =>
  244. import('@/teacher/piano-room/class-arrangement/create-class'),
  245. meta: {
  246. title: '创建直播课'
  247. }
  248. },
  249. {
  250. path: '/rechargeRecord',
  251. name: 'rechargeRecord',
  252. component: () => import('@/teacher/piano-room/recharge-record'),
  253. meta: {
  254. title: '交易记录'
  255. }
  256. },
  257. {
  258. path: '/cashProtocol',
  259. name: 'cashProtocol',
  260. component: () => import('@/teacher/cash-protocol/index'),
  261. meta: {
  262. title: '结算协议'
  263. }
  264. },
  265. {
  266. path: '/incomeConsus',
  267. name: 'incomeConsus',
  268. component: () => import('@/teacher/income-consus/index'),
  269. meta: {
  270. title: '收入统计'
  271. }
  272. },
  273. {
  274. path: '/extendPlan',
  275. name: 'extendPlan',
  276. component: () => import('@/teacher/extend-plan/index'),
  277. meta: {
  278. title: '推广计划'
  279. }
  280. },
  281. {
  282. path: '/extendPlanDetail',
  283. name: 'extendPlanDetail',
  284. component: () => import('@/teacher/extend-plan/detail'),
  285. meta: {
  286. title: '推广计划'
  287. }
  288. },
  289. {
  290. path: '/track-review-activity',
  291. component: () =>
  292. import('@/teacher/share-page/track-review-activity/index'),
  293. meta: {
  294. title: '曲目评测活动'
  295. }
  296. },
  297. {
  298. path: '/leaderboard',
  299. component: () => import('@/teacher/leaderboard/index'),
  300. meta: {
  301. title: '曲目挑战排行榜'
  302. // isExternal: true // 是否外部浏览器可以打开
  303. }
  304. },
  305. {
  306. path: '/mySheetMusic',
  307. component: () => import('@/teacher/my-sheetMusic'),
  308. meta: {
  309. title: '我的乐谱'
  310. }
  311. },
  312. {
  313. path: '/teacherHome',
  314. component: () => import('@/teacher/teacher-dependent/teacher-home'),
  315. meta: {
  316. title: '老师主页'
  317. }
  318. },
  319. {
  320. path: '/train-tool',
  321. component: () => import('@/tenant/music/train-tool'),
  322. meta: {
  323. title: '训练教程'
  324. }
  325. },
  326. {
  327. path: '/courseList',
  328. component: () => import('@/tenant/music/courseList'),
  329. meta: {
  330. title: '教程详情'
  331. }
  332. },
  333. {
  334. path: '/coursewarePlay',
  335. component: () => import('@/tenant/music/coursewarePlay'),
  336. meta: {
  337. title: '教程播放'
  338. }
  339. },
  340. {
  341. path: '/upload-protocol',
  342. component: () => import('@/teacher/music/upload-protocol'),
  343. meta: {
  344. title: '协议'
  345. }
  346. }
  347. ]
  348. },
  349. ...rootRouter,
  350. ...noLoginRouter,
  351. {
  352. path: '/:pathMatch(.*)*',
  353. component: () => import('@/views/404'),
  354. meta: {
  355. title: '404 Not Fund',
  356. platform: 'TEACHER'
  357. }
  358. }
  359. ]