import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/login/login' // 登陆
import Index from '@/components/index/index' // 首页
import ZHGL from '@/components/zhuanghaoguanli/zhuanghaoguanli' // 账户管理

import NewsFocus from '@/components/newsFocus' // 新闻聚焦
import EarlyWarning from '@/components/earlyWarning' // 旅游人数预警
import Consumption from '@/components/consumption' // 消费占比
import EventPlanning from '@/components/eventPlanning' // 活动策划
import PeopleCoefficient from '@/components/peopleCoefficient' // 人次系数
import Serve from '@/components/serve' // 智慧服务
import Form from '@/components/form' // 报表

Vue.use(Router)

export default new Router({
	// mode: 'history',
	// base: '/travel/',
	routes: [
		{
			path: '/',
			name: 'Login',
			component: Login
		}, {
			path: '/travel/index',
			name: 'index',
			redirect: '/travel/index/consumption', // 设置默认打开的页面
			component: Index,
			children: [{
				path: 'zhgl',
				name: 'ZHGL',
				component: ZHGL // 账户管理
			},
			{
				path: 'consumption',
				name: 'consumption',
				component: Consumption // 消费占比
			},
			{
				path: 'newsFocus',
				name: 'newsFocus',
				component: NewsFocus // 新闻聚焦
			},
			{
				path: 'earlyWarning',
				name: 'earlyWarning',
				component: EarlyWarning // 旅游人数预警
			}, {
				path: 'eventPlanning',
				name: 'eventPlanning',
				component: EventPlanning // 活动策划
			},
			{
				path: 'peopleCoefficient',
				name: 'peopleCoefficient',
				component: PeopleCoefficient // 人次系数
			},
			{
				path: 'serve',
				name: 'serve',
				component: Serve // 智慧服务
			},
			{
				path: 'form',
				name: 'form',
				component: Form // 报表
			},
			]
		}]
})
