import App from '../App'

const activity = r => require.ensure([], () => r(require('../views/activity/activity')), 'activity')
// const teachers = r => require.ensure([], () => r(require('../views/index')), 'teachers')
const teachers = r => require.ensure([], () => r(require('../views/teachers/index')), 'teachers')
const teachersDetail = r => require.ensure([], () => r(require('../views/teachers/detail')), 'teachersDetail')

export default [{
    path: '/',
    component: App, //顶层路由，对应index.html
    children: [ //二级路由。对应App.vue
        //地址为空时跳转home页面
        {
            path: '',
            redirect: '/activity'
        },
        //首页城市列表页
        // {
        //     path: '/home',
        //     component: home
        // },
        {
            path: '/activity',
            component: activity
        },
        {
            path: '/teachers',
            component: teachers
        },
        {
            path: '/teachersDetail',
            component: teachersDetail
        },
    ]
}]
