import App from '../App'

const home = r => require.ensure([], () => r(require('../views/home/home-new')), 'home')
const activity = r => require.ensure([], () => r(require('../views/activity/activity')), 'activity')
const teachers = r => require.ensure([], () => r(require('../views/teachers/index')), 'teachers')
const teachersDetail = r => require.ensure([], () => r(require('../views/teachers/detail')), 'teachersDetail')
const spCooperation = r => require.ensure([], () => r(require('../views/spCooperation/spCooperation')), 'spCooperation')
//const gpranking = r => require.ensure([], () => r(require('../views/gpranking/gpranking.vue')), 'gpranking')



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