index.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. import Vue from 'vue';
  2. import VueRouter from 'vue-router';
  3. Vue.use(VueRouter);
  4. const routes = [
  5. {
  6. path: '/',
  7. name: '',
  8. component: () => import('../views/index.vue'),
  9. },
  10. // 登录
  11. {
  12. path: '/login',
  13. meta: { title: '登录', subSite: true },
  14. component: () => import('../views/login.vue'),
  15. },
  16. // 注册
  17. {
  18. path: '/register',
  19. meta: { title: '注册', subSite: true },
  20. component: () => import('../views/register.vue'),
  21. },
  22. // 新闻动态
  23. {
  24. path: '/news/index',
  25. meta: { title: '新闻动态', subSite: true },
  26. component: () => import('../views/news/index.vue'),
  27. },
  28. // 新闻动态列表+详情
  29. {
  30. path: '/news/listDetail',
  31. meta: { title: '新闻详情', subSite: true },
  32. component: () => import('../views/news/listDetail.vue'),
  33. },
  34. // 计算服务
  35. {
  36. path: '/service/index',
  37. meta: { title: '计算服务', subSite: true },
  38. component: () => import('../views/service/index.vue'),
  39. },
  40. // 计算服务-详情
  41. {
  42. path: '/service/detail',
  43. meta: { title: '计算服务', subSite: true },
  44. component: () => import('../views/service/detail.vue'),
  45. },
  46. // 交流互动
  47. {
  48. path: '/communication/index',
  49. meta: { title: '交流互动', subSite: true },
  50. component: () => import('../views/communication/index.vue'),
  51. },
  52. //成果展示
  53. {
  54. path: '/achievement/index',
  55. name: '平台建设',
  56. component: () => import('../views/achievement/index.vue'),
  57. },
  58. // 党建学苑
  59. {
  60. path: '/partisan/index',
  61. name: '党建学苑',
  62. component: () => import('../views/partisan/index.vue'),
  63. },
  64. // 个人中心
  65. {
  66. path: '/pcenter/index',
  67. name: '个人中心',
  68. component: () => import('../views/pcenter/index.vue'),
  69. },
  70. ];
  71. const router = new VueRouter({
  72. mode: 'history',
  73. base: process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROUTER,
  74. routes,
  75. });
  76. // const router = new VueRouter({
  77. // routes,
  78. // });
  79. export default router;