Newer
Older
KaiFengWechat / src / router / index.js
@鲁yixuan 鲁yixuan on 12 Jul 1 KB update
import { createRouter, createWebHistory } from 'vue-router';
//ifBack 返回箭头是否显示,ifShowHead 整个头部bar是否显示,ifSearch是否显示筛选条件框,ifAdd是否显示新增筛选icon
const router = createRouter({
  history: createWebHistory('/'),
  routes: [
    {
      path: '/:catchAll(.*)', //错误路由地址重定向
      redirect: '/ElectronicMap',
    },
    {
      path: '/ElectronicMap',
      name: 'ElectronicMap',
      component: () => import('@/views/ElectronicMap.vue'),
      meta: { keepAlive: false, title: '电子地图' },
    },
    {
      path: '/questionnaire',
      name: 'questionnaire',
      component: () => import('@/views/questionnaire.vue'),
      meta: { keepAlive: false, title: '问卷调查' },
    },
    {
      path: '/SpongeCulture',
      name: 'SpongeCulture',
      component: () => import('@/views/SpongeCulture.vue'),
      meta: { keepAlive: false, title: '海绵文化' },
    },
    {
      path: '/PublicAdvice',
      name: 'PublicAdvice',
      component: () => import('@/views/PublicAdvice.vue'),
      meta: { keepAlive: false, title: '公众建议' },
    },
    {
      path: '/newsdetail',
      name: 'newsdetail',
      component: () => import('@/views/news/newsdetail.vue'),
      meta: { keepAlive: false, title: '详情', ifShowHead: true },
    },
  ],
});

export default router;