123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- import Vue from 'vue';
- import VueRouter from 'vue-router';
- import checkLogin from '@common/router/before';
- Vue.use(VueRouter);
- const routes = [
- // 首页
- {
- path: '/',
- meta: { title: '首页管理' },
- component: () => import('../views/home/index.vue'),
- },
- // 菜单管理
- {
- path: '/menu/index',
- meta: { title: '菜单管理' },
- component: () => import('../views/menu/index.vue'),
- },
- // 用戶管理
- // 个人与企业
- {
- path: '/user/index',
- meta: { title: '个人&企业用户管理' },
- component: () => import('../views/user/index.vue'),
- },
- // 添加+修改
- {
- path: '/user/detail',
- meta: { title: '个人&企业用户信息管理' },
- component: () => import('../views/user/detail.vue'),
- },
- // 专家
- {
- path: '/user/exportIndex',
- meta: { title: '专家用户管理' },
- component: () => import('../views/user/exportIndex.vue'),
- },
- // 临时
- {
- path: '/user/temporaryIndex',
- meta: { title: '临时用户管理' },
- component: () => import('../views/user/temporaryIndex.vue'),
- },
- // 部门管理
- {
- path: '/department/index',
- meta: { title: '部门管理' },
- component: () => import('../views/department/index.vue'),
- },
- //产品供求审核管理
- {
- path: '/enterpriseProduct/index',
- meta: { title: '产品供求审核管理' },
- component: () => import('../views/enterpriseProduct/index.vue'),
- },
- //产品供求交易状态审核管理
- {
- path: '/enterpriseTrans/index',
- meta: { title: '产品供求交易状态审核管理' },
- component: () => import('../views/enterpriseTrans/index.vue'),
- },
- //科技超市发起交易审核详情
- {
- path: '/enterpriseTrans/detail',
- component: () => import('../views/enterpriseTrans/detail.vue'),
- },
- //科技超市交易审核管理
- {
- path: '/enterpriseTrans/jiaoyidetail',
- component: () => import('../views/enterpriseTrans/jiaoyidetail.vue'),
- },
- //技术培训
- {
- path: '/technical/index',
- meta: { title: '技术培训' },
- component: () => import('../views/technical/index.vue'),
- },
- // 技术培训-栏目列表
- {
- path: '/technical/columnDetail',
- component: () => import('../views/technical/columnDetail.vue'),
- },
- // 技术培训-信息列表
- {
- path: '/technical/messageInfoDetail',
- component: () => import('../views/technical/messageInfoDetail.vue'),
- },
- //字典管理
- {
- path: '/dictionary/index',
- meta: { title: '字典管理' },
- component: () => import('../views/dictionary/index.vue'),
- },
- ];
- const router = new VueRouter({
- mode: 'history',
- base: process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROUTER,
- routes,
- });
- checkLogin(router, () => {
- let url = process.env.NODE_ENV === 'development' ? null : `/platlive/login`;
- if (url) window.location.href = url;
- else console.log('开发环境自己弄');
- });
- export default router;
|