import Vue from 'vue' import VueRouter from 'vue-router' // import Layouts from "@/pages/layouts/Layouts.vue" // 解决重复点击同一个路由报错 const originalPush = VueRouter.prototype.push; VueRouter.prototype.push = function (location) { return originalPush.call(this, location).catch(err => err) } Vue.use(VueRouter) const routes = [ { path:'/', redirect:'/home' }, // 首页 { path: '/home', component: () => import('@/pages/home/Home.vue'), }, // 办事指南 { path: '/guidance', component: () => import('@/pages/guidance/Guidance.vue'), }, // 办事指南详情 { path: '/guidancedetails', component: () => import('@/pages/guidance/GuidanceDetails.vue'), }, // 通知公告 { path: '/announcement', component: () => import('@/pages/announcement/Announcement.vue'), }, // 公告详情 { path: '/announcementdetails', component: () => import('@/pages/announcement/AnnouncementDetails.vue'), }, // 意见建议 { path: '/suggest', component: () => import('@/pages/suggest/Suggest.vue'), }, // 意见建议详情 { path: '/suggestdetails', component: () => import('@/pages/suggest/SuggestDetails.vue'), }, // 我要建议 { path: '/propound', component: () => import('@/pages/suggest/Propound.vue'), }, // 中心简介 { path: '/synopsis', component: () => import('@/pages/synopsis/Synopsis.vue'), }, // 快速填单 { path: '/matterList', component: () => import('@/pages/write/matterList.vue'), }, // 打印空白材料 { path: '/Print', component: () => import('@/pages/Print/PrintEmptyMaterals.vue'), }, // 快速搜索 { path: '/searchpage', component: () => import('@/pages/searchpage/SearchPage.vue'), }, // 自助填单 { path: '/writepage', component: () => import('@/pages/write/WritePage.vue'), }, ] const router = new VueRouter({ routes }) export default router