index.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. import Vue from 'vue';
  2. import VueRouter from 'vue-router';
  3. import checkLogin from './before';
  4. Vue.use(VueRouter);
  5. const routes = [
  6. {
  7. path: '/',
  8. name: 'index',
  9. meta: { title: '首页' },
  10. component: () => import('../views/index.vue'),
  11. },
  12. {
  13. path: '/anchor/index',
  14. meta: { title: '主播管理' },
  15. component: () => import('../views/anchor/index.vue'),
  16. },
  17. {
  18. path: '/anchor/detail',
  19. meta: { title: '主播详情' },
  20. component: () => import('../views/anchor/detail.vue'),
  21. },
  22. {
  23. path: '/role/index',
  24. meta: { title: '菜单管理' },
  25. component: () => import('../views/role/index.vue'),
  26. },
  27. {
  28. path: '/role/detail',
  29. meta: { title: '菜单详情' },
  30. component: () => import('../views/role/detail.vue'),
  31. },
  32. {
  33. path: '/live/index',
  34. meta: { title: '直播管理' },
  35. component: () => import('../views/live/index.vue'),
  36. },
  37. {
  38. path: '/live/detail',
  39. meta: { title: '直播详情' },
  40. component: () => import('../views/live/detail.vue'),
  41. },
  42. {
  43. path: '/live/meetingDetail',
  44. meta: { title: '会议直播详情' },
  45. component: () => import('../views/live/meetingDetail.vue'),
  46. },
  47. {
  48. path: '/room/index',
  49. meta: { title: '房间管理' },
  50. component: () => import('../views/room/index.vue'),
  51. },
  52. {
  53. path: '/room/detail',
  54. meta: { title: '房间详情' },
  55. component: () => import('../views/room/detail.vue'),
  56. },
  57. {
  58. path: '/room/detailStatus',
  59. meta: { title: '房间状态审核' },
  60. component: () => import('../views/room/detailStatus.vue'),
  61. },
  62. // 统计
  63. {
  64. path: '/room/statList',
  65. meta: { title: '房间观看人数统计' },
  66. component: () => import('../views/room/statList.vue'),
  67. },
  68. {
  69. path: '/test/index',
  70. meta: { title: '测试管理' },
  71. component: () => import('../views/test/index.vue'),
  72. },
  73. {
  74. path: '/test/detail',
  75. meta: { title: '添加' },
  76. component: () => import('../views/test/detail.vue'),
  77. },
  78. {
  79. path: '/question/index',
  80. meta: { title: '问卷管理' },
  81. component: () => import('../views/question/index.vue'),
  82. },
  83. {
  84. path: '/login',
  85. name: 'login',
  86. meta: { title: '登录' },
  87. component: () => import('../views/login.vue'),
  88. },
  89. ];
  90. const router = new VueRouter({
  91. mode: 'history',
  92. base: process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROUTER,
  93. routes,
  94. });
  95. checkLogin(router);
  96. export default router;