import Vue from 'vue'
import Router from 'vue-router'
const routerPush = Router.prototype.push
Vue.use(Router)
const ter = new Router({
	// mode: 'history',
	base: process.env.BASE_URL,
	routes: [{
			path: '/',
			redirect: '/home'
		},
		{
			path: '/test',
			name: 'home',
			component: () => import('../views/test.vue'),
			meta: {
				title: '节水测试'
			}
		},
		{
			path: '/home',
			name: 'home',
			component: () => import('../views/Home.vue'),
			meta: {
				title: '添利节能科技有限公司'
			}
		},
		{
			path: '/map',
			name: 'map',
			component: () => import('../views/Shuju.vue'),
			meta: {
				title: '地图'
			}
		},
		{
			path: '/product',
			name: 'product',
			component: () => import('../views/productList.vue'),
			meta: {
				title: '案例展示'
			}
		},
		{
			path: '/product/detail',
			name: 'datatile',
			component: () => import('../views/productDatatile.vue'),
			meta: {
				title: '案例详情'
			}
		},
		{
			path: '/news',
			name: 'news',
			component: () => import('../views/newsList.vue'),
			meta: {
				title: '新闻动态'
			}
		},
		{
			path: '/news/datatile',
			name: 'newDatatile',
			component: () => import('../views/newDatatile.vue'),
			meta: {
				title: '新闻详情'
			}
		},
		{
			path: '/about',
			name: 'about',
			component: () => import('../views/About.vue'),
			redirect: '/about/Company',
			meta: {
				title: '关于我们'
			},
			children: [{
					path: 'company',
					name: 'company',
					component: () => import('../views/about/Company.vue'),
					meta: {
						title: '公司介绍'
					}
				},
				{
					path: 'Concat',
					name: 'concat',
					component: () => import('../views/about/Concat.vue'),
					meta: {
						title: '联系我们'
					}
				},
				{
					path: 'Product',
					name: 'product',
					component: () => import('../views/about/Product.vue'),
					meta: {
						title: '产品介绍'
					}
				}
			]
		}

		// {
		// 	path: '*',
		// 	redirect: '/home'
		// }
	]
})

export default ter
