index.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. import Vue from 'vue';
  2. import VueRouter from 'vue-router';
  3. Vue.use(VueRouter);
  4. const routes = [
  5. {
  6. path: '/',
  7. meta: { title: '首页' },
  8. component: () => import('../views/index.vue'),
  9. },
  10. {
  11. path: '/anchor/index',
  12. meta: { title: '主播管理' },
  13. component: () => import('../views/anchor/index.vue'),
  14. },
  15. {
  16. path: '/anchor/detail',
  17. meta: { title: '主播详情' },
  18. component: () => import('../views/anchor/detail.vue'),
  19. },
  20. {
  21. path: '/role/index',
  22. meta: { title: '菜单管理' },
  23. component: () => import('../views/role/index.vue'),
  24. },
  25. {
  26. path: '/role/detail',
  27. meta: { title: '菜单详情' },
  28. component: () => import('../views/role/detail.vue'),
  29. },
  30. {
  31. path: '/live/index',
  32. meta: { title: '直播管理' },
  33. component: () => import('../views/live/index.vue'),
  34. },
  35. {
  36. path: '/room/index',
  37. meta: { title: '房间管理' },
  38. component: () => import('../views/room/index.vue'),
  39. },
  40. {
  41. path: '/room/detail',
  42. meta: { title: '房间详情' },
  43. component: () => import('../views/room/detail.vue'),
  44. },
  45. {
  46. path: '/stat/index',
  47. meta: { title: '统计管理' },
  48. component: () => import('../views/stat/index.vue'),
  49. },
  50. {
  51. path: '/test/index',
  52. meta: { title: '测试管理' },
  53. component: () => import('../views/test/index.vue'),
  54. },
  55. {
  56. path: '/test/detail',
  57. meta: { title: '添加' },
  58. component: () => import('../views/test/detail.vue'),
  59. },
  60. {
  61. path: '/login',
  62. meta: { title: '登录' },
  63. component: () => import('../views/login.vue'),
  64. },
  65. ];
  66. const router = new VueRouter({
  67. mode: 'history',
  68. base: process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROUTER,
  69. routes,
  70. });
  71. export default router;