|
|
|
import Vue from 'vue'
|
|
|
|
import Router from 'vue-router'
|
|
|
|
|
|
|
|
Vue.use(Router)
|
|
|
|
|
|
|
|
// 页面路由(独立页面)
|
|
|
|
const pageRoutes = [
|
|
|
|
{ path: '/', redirect: '/login' },
|
|
|
|
{
|
|
|
|
path: '/login',
|
|
|
|
component: () => import('@/page-subspecialty/views/login'),
|
|
|
|
name: 'login',
|
|
|
|
meta: { title: '登录' }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/question',
|
|
|
|
component: () => import('@/page-subspecialty/views/question'),
|
|
|
|
name: 'question',
|
|
|
|
meta: { title: '问卷调查' }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/questionEyehistory',
|
|
|
|
component: () => import('@/page-subspecialty/views/questionEyehistory'),
|
|
|
|
name: 'question',
|
|
|
|
meta: { title: '眼科病史问卷调查' }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/jmjlQuestionEyehistory',
|
|
|
|
component: () => import('@/page-subspecialty/views/jmjlQuestionEyehistory'),
|
|
|
|
name: 'question',
|
|
|
|
meta: { title: '交联眼科病史问卷调查' }
|
|
|
|
},{
|
|
|
|
path: '/complete',
|
|
|
|
component: () => import('@/page-subspecialty/views/complete'),
|
|
|
|
name: 'complete',
|
|
|
|
meta: { title: '调查完成' }
|
|
|
|
},
|
|
|
|
// 部署时注销掉
|
|
|
|
{
|
|
|
|
path: '/article',
|
|
|
|
component: () => import('@/page-subspecialty/views/article'),
|
|
|
|
name: 'article',
|
|
|
|
meta: { title: '文章' }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/articleList',
|
|
|
|
component: () => import('@/page-subspecialty/views/articleList'),
|
|
|
|
name: 'articleList',
|
|
|
|
meta: { title: '文章列表' }
|
|
|
|
}, {
|
|
|
|
path: '/editor',
|
|
|
|
component: () => import('@/page-subspecialty/views/editor'),
|
|
|
|
name: 'editor',
|
|
|
|
meta: { title: '编辑器' }
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
const router = new Router({
|
|
|
|
mode: 'history',
|
|
|
|
// base: process.env.NODE_ENV === 'production' ? process.env.VUE_APP_BASE_HOUZHUI : '/', // 公司内部环境打开--浏览器基础路径
|
|
|
|
routes: pageRoutes
|
|
|
|
})
|
|
|
|
|
|
|
|
router.beforeEach((to, from, next) => {
|
|
|
|
// to and from are both route objects. must call `next`.
|
|
|
|
next()
|
|
|
|
})
|
|
|
|
|
|
|
|
export default router
|