import App from '../App'

const index = r => require.ensure([], () => r(require('../views/index')), 'index')
const search = r => require.ensure([], () => r(require('../views/search-index')), 'search')
const result = r => require.ensure([], () => r(require('../views/result')), 'result')
const details = r => require.ensure([], () => r(require('../views/teacher-details')), 'details')

export default [{
    path: '/',
    component: App, //顶层路由，对应index.html
    children: [
        {
            path: '',
            redirect: '/index'
        },
        {
            path: '/index',
            component: index
        },
        {
            path: '/search',
            component: search
        },
        {
            path: '/result',
            component: result
        },
        {
            path: '/details',
            component: details
        }
    ]
}]
