// router.js
import Vue from 'vue';
import Router from 'vue-router';
Vue.use(Router);
const router = new Router({
	// mode: 'history',
	routes: [{
			path: '/',
			redirect: '/layout'
		},
		{
			path: '/layout',
			component: resolve => require(['../view/layout.vue'], resolve),
			meta: {
				title: '布局'
			},
			children: [
				{
					path: '/a-picture',
					component: resolve => require(['../view/a-picture/index.vue'], resolve),
					meta: {
						title: '可视化配置'
					}
				},
				{
					path: '/a-picture/edit',
					component: resolve => require(['../view/a-picture/edit.vue'], resolve),
					meta: {
						title: '可视化配置'
					}
				},
				{
					path: '/role',
					component: resolve => require(['../view/system/role.vue'], resolve),
					meta: {
						title: '角色管理'
					}
				},
				{
					path: '/area-data',
					component: resolve => require(['../view/areaData/areaData.vue'], resolve),
					meta: {
						title: '元数据管理'
					}
				},
				{
					path: '/help-manage',
					component: resolve => require(['../view/help-manage/helpManage.vue'], resolve),
					meta: {
						title: '产业扶贫'
					}
				},
				{
					path: '/expert-team',
					component: resolve => require(['../view/expertTeam/expertTeam.vue'], resolve),
					meta: {
						title: '专家团队管理'
					}
				},
				{
					path: '/dam-manage',
					component: resolve => require(['../view/damManage/damManage.vue'], resolve),
					meta: {
						title: '专题管理管理'
					}
				},
				{
					path: '/pwd-manage',
					component: resolve => require(['../view/pwdManage/pwdManage.vue'], resolve),
					meta: {
						title: '口令管理'
					}
				},
				{
					path: '/user',
					component: resolve => require(['../view/system/user.vue'], resolve),
					meta: {
						title: '用户管理'
					}
				},{
					path: '/tpl',
					component: resolve => require(['../view/system/tpl.vue'], resolve),
					meta: {
						title: '模板管理'
					}
				}
			]
		},
		{
			path: '/login',
			component: resolve => require(['../view/login.vue'], resolve),
			meta: {
				title: '登录'
			}
		}
	]
});
export default router;
