routes-school.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. import Auth from '@/views/layout/auth'
  2. import { router, rootRouter } from './routes-common'
  3. type metaType = {
  4. isRegister: boolean
  5. }
  6. // 不需要登录的路由
  7. const noLoginRouter = []
  8. export default [
  9. {
  10. path: '/',
  11. component: Auth,
  12. children: [
  13. ...router,
  14. {
  15. path: '/login',
  16. name: 'login',
  17. component: () => import('@/views/layout/login'),
  18. meta: {
  19. isRegister: false
  20. } as metaType
  21. },
  22. {
  23. path: '/home',
  24. name: 'home',
  25. component: () => import('@/school/home/index')
  26. },
  27. {
  28. path: '/my-orchestra',
  29. name: 'my-orchestra',
  30. component: () => import('@/school/orchestra/index'),
  31. meta: {
  32. title: '我的乐团'
  33. }
  34. },
  35. {
  36. path: '/create-orchestra',
  37. name: 'create-orchestra',
  38. component: () => import('@/school/orchestra/create-orchestra'),
  39. meta: {
  40. title: '新建乐团'
  41. }
  42. },
  43. {
  44. path: '/orchestra-detail',
  45. name: 'orchestra-detail',
  46. component: () => import('@/school/orchestra/orchestra-detail'),
  47. meta: {
  48. title: '乐团详情'
  49. }
  50. },
  51. {
  52. path: '/mass-message',
  53. name: 'mass-message',
  54. component: () => import('@/school/mass-message/index'),
  55. meta: {
  56. title: '群发记录'
  57. }
  58. },
  59. {
  60. path: '/create-message',
  61. name: 'create-message',
  62. component: () => import('@/school/mass-message/create-message'),
  63. meta: {
  64. title: '群发消息'
  65. }
  66. },
  67. {
  68. path: '/exercise-record',
  69. name: 'exercise-record',
  70. component: () => import('@/school/exercise-record'),
  71. meta: {
  72. title: '练习记录'
  73. }
  74. },
  75. {
  76. path: '/exercis-detail',
  77. name: 'exercis-detail',
  78. component: () => import('@/school/exercise-record/exercis-detail'),
  79. meta: {
  80. title: '测评详情'
  81. }
  82. },
  83. {
  84. path: '/attendance',
  85. name: 'attendance',
  86. component: () => import('@/school/attendance/index'),
  87. meta: {
  88. title: '考勤管理'
  89. }
  90. },
  91. {
  92. path: '/student-att-day',
  93. name: 'student-att-day',
  94. component: () => import('@/school/attendance/student-att-day'),
  95. meta: {
  96. title: '考勤详情'
  97. }
  98. }
  99. ]
  100. },
  101. ...rootRouter,
  102. ...noLoginRouter
  103. ]