import Vue from 'vue'; import VueRouter from 'vue-router'; import checkLogin from '@common/router/before'; Vue.use(VueRouter); const live = [ { path: '/live', name: 'live', component: () => import('../views/index.vue'), children: [ { path: '/live/detail', meta: { title: '信息详情', subSite: true }, name: 'live_detail', component: () => import('../views/detail/detail.vue'), }, { path: '/market/index', name: 'market_index', meta: { title: '科技超市', subSite: true }, component: () => import('../views/market/index.vue'), }, { path: '/dynamic/index', name: 'dynamic_index', meta: { title: '动态监测', subSite: true }, component: () => import('../views/dynamic/index.vue'), }, { path: '/dynamic/list', name: 'dynamic_list', meta: { title: '动态监测列表', subSite: true }, component: () => import('../views/dynamic/list.vue'), }, { path: '/technical/index', name: 'technical_index', meta: { title: '技术培训', subSite: true }, component: () => import('../views/technical/index.vue'), }, { path: '/hallList/index', name: 'hallList_lzhibolist', meta: { title: '直播大厅列表', subSite: true }, component: () => import('../views/hallList/index.vue'), }, { path: '/technical/list', name: 'technical_list', meta: { title: '技术培训列表', subSite: true }, component: () => import('../views/technical/list.vue'), }, { path: '/live/liveApply', meta: { title: '项目申请', subSite: true }, name: 'live_apply', component: () => import('../views/hall/liveApply.vue'), }, { path: '/kejipeixun/index', name: 'kejipeixun_index', meta: { title: '科技培训', subSite: true }, component: () => import('../views/kejipeixun/index.vue'), }, { path: '/kejipeixun/list', name: 'kejipeixun_list', meta: { title: '科技培训列表', subSite: true }, component: () => import('../views/kejipeixun/list.vue'), }, { path: '/live/service', meta: { title: '创新服务', subSite: true }, name: 'live_service', component: () => import('../views/service/index.vue'), }, { path: '/live/liveApply', meta: { title: '项目申请', subSite: true }, name: 'live_apply', component: () => import('../views/hall/liveApply.vue'), }, ], }, { path: '/direct', name: 'live_direct', meta: { title: '直播大厅', subSite: true }, component: () => import('../views/direct.vue'), }, { path: '/hall/index', name: 'hall_index', meta: { title: '直播首页', subSite: true }, component: () => import('../views/hall/index.vue'), }, { path: '/live/liveList', meta: { title: '直播中心', subSite: true }, name: 'live_list', component: () => import('../views/hall/liveList.vue'), }, { path: '/live/hallDetail', meta: { title: '直播详情', subSite: true }, name: 'live_hallDetail', component: () => import('../views/hall/hallDetail.vue'), }, { path: '/live/hall/dock/dockDetail', meta: { title: '项目信息详情', subSite: true }, name: 'dock_Detail', component: () => import('../views/hall/dock/dockDetail.vue'), }, { path: '/live/hall/dock/zhuanjiaDetail', meta: { title: '专家信息详情', subSite: true }, name: 'dock_Detail', component: () => import('../views/hall/dock/zhuanjiaDetail.vue'), }, { path: '/live/hall/dock/dockInfo', meta: { title: '对接信息查看', subSite: true }, name: 'dock_Info', component: () => import('../views/hall/dock/dockInfo.vue'), }, { path: '/', meta: { title: '直播首页', subSite: true }, name: 'home_index', component: () => import('../views/home.vue'), }, ]; const routes = [...live]; const router = new VueRouter({ mode: 'history', base: process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROUTER, routes, }); checkLogin(router); export default router;