import Vue from 'vue' import Router from 'vue-router' import { normalizeURL, decode } from 'ufo' import { interopDefault } from './utils' import scrollBehavior from './router.scrollBehavior.js' const _4b81ed11 = () => interopDefault(import('../src/pages/article/index.vue' /* webpackChunkName: "pages/article/index" */)) const _45864e0c = () => interopDefault(import('../src/pages/doctor/index.vue' /* webpackChunkName: "pages/doctor/index" */)) const _3729b6ed = () => interopDefault(import('../src/pages/more.vue' /* webpackChunkName: "pages/more" */)) const _779b537a = () => interopDefault(import('../src/pages/search/index.vue' /* webpackChunkName: "pages/search/index" */)) const _240caca6 = () => interopDefault(import('../src/pages/user/index.vue' /* webpackChunkName: "pages/user/index" */)) const _4ad07256 = () => interopDefault(import('../src/pages/video/index.vue' /* webpackChunkName: "pages/video/index" */)) const _394ae834 = () => interopDefault(import('../src/pages/other/about.vue' /* webpackChunkName: "pages/other/about" */)) const _4c6b2b63 = () => interopDefault(import('../src/pages/other/agreement.vue' /* webpackChunkName: "pages/other/agreement" */)) const _114b4da8 = () => interopDefault(import('../src/pages/other/cookies.vue' /* webpackChunkName: "pages/other/cookies" */)) const _23ed8784 = () => interopDefault(import('../src/pages/other/corporate.vue' /* webpackChunkName: "pages/other/corporate" */)) const _9e1bc1dc = () => interopDefault(import('../src/pages/other/disclaimer.vue' /* webpackChunkName: "pages/other/disclaimer" */)) const _2424f59e = () => interopDefault(import('../src/pages/other/link.vue' /* webpackChunkName: "pages/other/link" */)) const _5edfebbe = () => interopDefault(import('../src/pages/other/privacy.vue' /* webpackChunkName: "pages/other/privacy" */)) const _3b2c0424 = () => interopDefault(import('../src/pages/user/setting.vue' /* webpackChunkName: "pages/user/setting" */)) const _3a19ffb9 = () => interopDefault(import('../src/pages/article/_id.vue' /* webpackChunkName: "pages/article/_id" */)) const _3a40d1e2 = () => interopDefault(import('../src/pages/doctor/_id.vue' /* webpackChunkName: "pages/doctor/_id" */)) const _6763123e = () => interopDefault(import('../src/pages/video/_id.vue' /* webpackChunkName: "pages/video/_id" */)) const _147516ea = () => interopDefault(import('../src/pages/index.vue' /* webpackChunkName: "pages/index" */)) const emptyFn = () => {} Vue.use(Router) export const routerOptions = { mode: 'history', base: '/', linkActiveClass: 'nuxt-link-active', linkExactActiveClass: 'nuxt-link-exact-active', scrollBehavior, routes: [{ path: "/article", component: _4b81ed11, name: "article" }, { path: "/doctor", component: _45864e0c, name: "doctor" }, { path: "/more", component: _3729b6ed, name: "more" }, { path: "/search", component: _779b537a, name: "search" }, { path: "/user", component: _240caca6, name: "user" }, { path: "/video", component: _4ad07256, name: "video" }, { path: "/other/about", component: _394ae834, name: "other-about" }, { path: "/other/agreement", component: _4c6b2b63, name: "other-agreement" }, { path: "/other/cookies", component: _114b4da8, name: "other-cookies" }, { path: "/other/corporate", component: _23ed8784, name: "other-corporate" }, { path: "/other/disclaimer", component: _9e1bc1dc, name: "other-disclaimer" }, { path: "/other/link", component: _2424f59e, name: "other-link" }, { path: "/other/privacy", component: _5edfebbe, name: "other-privacy" }, { path: "/user/setting", component: _3b2c0424, name: "user-setting" }, { path: "/article/:id", component: _3a19ffb9, name: "article-id" }, { path: "/doctor/:id", component: _3a40d1e2, name: "doctor-id" }, { path: "/video/:id", component: _6763123e, name: "video-id" }, { path: "/", component: _147516ea, name: "index" }], fallback: false } export function createRouter (ssrContext, config) { const base = (config._app && config._app.basePath) || routerOptions.base const router = new Router({ ...routerOptions, base }) // TODO: remove in Nuxt 3 const originalPush = router.push router.push = function push (location, onComplete = emptyFn, onAbort) { return originalPush.call(this, location, onComplete, onAbort) } const resolve = router.resolve.bind(router) router.resolve = (to, current, append) => { if (typeof to === 'string') { to = normalizeURL(to) } return resolve(to, current, append) } return router }