You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

119 lines
4.2 KiB

import Vue from 'vue';
import Router from 'vue-router';
Vue.use(Router);
let router = new Router({
mode: 'hash',
    base: process.env.BASE_URL,
routes: [
{
path: '/',
redirect: '/login'
},
{
path: '/',
component: () => import(/* webpackChunkName: "home" */ '../views/Home.vue'),
meta: { title: '自述文件' },
children: [
{
path: '/dashboard',
component: () => import(/* webpackChunkName: "dashboard" */ '../views/customer/Dashboard.vue'),
meta: { title: '客户管理' }
},
{
path: '/addcustomer',
component: () => import( '../views/customer/AddCustomer.vue'),
meta: { title: '新增客户' }
},
{
path: '/user',
component: () => import( '../views/user/User.vue'),
meta: { title: '用户管理' }
},
{
path: '/adduser',
component: () => import( '../views/user/AddUser.vue'),
meta: { title: '新增用户' }
},
{
path: '/order',
component: () => import( '../views/oder/Order.vue'),
meta: { title: '订单管理' }
},
{
path: '/addorder',
component: () => import( '../views/oder/AddOrder.vue'),
meta: { title: '新增订单' }
},
{
path: '/configure',
component: () => import( '../views/serve/Configure.vue'),
meta: { title: '服务配置' }
},
{
path: '/addconfigure',
component: () => import( '../views/serve/AddConfigure.vue'),
meta: { title: '新增配置' }
},
{
path: '/curriculum',
component: () => import( '../views/course/Curriculum.vue'),
meta: { title: '课程管理' }
},
{
path: '/addcurriculum',
component: () => import( '../views/course/AddCurriculum.vue'),
meta: { title: '新建课程' }
},
{
path: '/addlink',
component: () => import( '../views/course/AddLink.vue'),
meta: { title: '添加环节' }
},
{
path: '/data',
component: () => import( '../views/data/Data.vue'),
meta: { title: '数据管理' }
},
{
path: '/permission',
component: () => import('../views/customer/Permission.vue'),
meta: { title: '应用权限', permission: true }
},
{
path: '/person',
component: () => import('../views/setting/Person.vue'),
meta: { title: '个人中心' }
},
{
path: '/404',
component: () => import(/* webpackChunkName: "404" */ '../views/404.vue'),
meta: { title: '404' }
},
{
path: '/403',
component: () => import(/* webpackChunkName: "403" */ '../views/403.vue'),
meta: { title: '403' }
}
]
},
{
path: '/login',
component: () => import(/* webpackChunkName: "login" */ '../views/Login.vue'),
meta: { title: '登录' }
},
{
path: '*',
redirect: '/404'
}
]
});
router.beforeEach(function(to,from,next){
// 根据路由元信息设置文档标题
window.document.title = to.meta.title || '中台'
next()
})
export default router