routes-teacher.ts 9.0 KB

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