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: '/login', meta: { title: '登陆' }, component: () => import('../views/login.vue'), }, { path: '/live/detail', meta: { title: '信息详情', subSite: true }, name: 'live_detail', component: () => import('../views/detail/detail.vue'), }, // 专题研讨 { path: '/live/semDetail', meta: { title: '信息详情', subSite: true }, name: 'live_semDetail', component: () => import('../views/detail/semDetail.vue'), }, // 教育培训 { path: '/live/eduDetail', meta: { title: '信息详情', subSite: true }, name: 'live_eduDetail', component: () => import('../views/detail/eduDetail.vue'), }, { path: '/market/index', name: 'market_index', meta: { title: '科技超市', subSite: true }, component: () => import('../views/market/index.vue'), }, { path: '/personnel/rencai', name: 'personnel', meta: { title: '专家详情', subSite: true }, component: () => import('../views/personnel/rencai.vue'), }, { path: '/personnel/list', name: 'personnel', meta: { title: '专家列表', subSite: true }, component: () => import('../views/personnel/list.vue'), }, //科技超市列表 { path: '/supermaket/supermarketlist', name: 'supermarketuct', component: () => import('../views/supermaket/supermarketlist.vue'), }, //xiangqing { path: '/supermaket/supermarketdetail', name: 'supermarketdetail', component: () => import('../views/supermaket/supermarketdetail.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: '/market/contact', name: 'contact', meta: { title: '科技对接' }, component: () => import('../views/market/contact.vue'), }, ], }, //企业-信息管理 { path: '/enterprise/enterprisexx', name: 'enterprisexuqiu', component: () => import('../views/enterprise/enterprisexx.vue'), }, // 企业-需求发布 { path: '/enterprise/enterprisexuqiu', name: 'enterprisexuqiu', component: () => import('../views/enterprise/enterprisexuqiu.vue'), }, //企业-订购 { path: '/enterprise/enterprisedg', name: 'enterprisedg', component: () => import('../views/enterprise/enterprisedg.vue'), }, //修改密码 { path: '/enterprise/xiugai', name: 'enterprisedg', component: () => import('../views/enterprise/xiugai.vue'), }, //企业-基本信息 { path: '/enterprise/enterprisejb', name: 'enterprisefabu', component: () => import('../views/enterprise/enterprisejb.vue'), }, //企业-基本信息 { path: '/enterprise/useredit', name: 'enterpriseuseredit', component: () => import('../views/enterprise/useredit.vue'), }, // //企业-发布信息列表 { path: '/enterprise/enterprisefabu', name: 'enterprisefabu', component: () => import('../views/enterprise/enterprisefabu.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;