routes-teacher.ts 9.8 KB

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