import App from '../App'

const login = r => require.ensure([], () => r(require('../views/login')), 'login')

const home = r => require.ensure([], () => r(require('../views/home')), 'home')
const blank = r => require.ensure([], () => r(require('../views/blank')), 'blank')
const itemManager = r => require.ensure([], () => r(require('../views/education/item-manager.vue')), 'item-manager')
const itemComponent = r => require.ensure([], () => r(require('../views/education/item-component.vue')), 'item-component')
const createComponent = r => require.ensure([], () => r(require('../views/education/create-component.vue')),'create-component')
const roleManager = r => require.ensure([], () => r(require('../views/system/role.vue')),'role')
const addManager = r => require.ensure([], () => r(require('../views/education/add-manager.vue')), 'add-manager')
const itemRole = r => require.ensure([], () => r(require('../views/system/item-role.vue')), 'item-role')
const msgPush = r => require.ensure([], () => r(require('../views/msgpush/msg-push.vue')), 'msg-push')


import patientsRouters from './patients'

import followRouters from './follow'

export default [{
    path: '/',
    component: App,
    children: [
        {
          path: '/login',
          component: login,
          name: 'loginPage',
        },
        {
            path: '',
            redirect: '/home'
        },{
            path: '/index',
            component: home
        },{
            path: '/home',
            component: home
        },{
            path: '/blank',
            component: blank
        },{
            path: '/item-manager',
            component: itemManager
        },{
            path: '/add-manager',
            component: addManager
        },{
            path: '/item-component',
            component: itemComponent
        },{
            path: '/role',
            component: roleManager
        },{
            path: '/create-component',
            component: createComponent
        },{
            path: '/item-role',
            component: itemRole
        },
      {
        path: '/msg-push',
        component: msgPush
      },
        followRouters,
        patientsRouters,
    ]
  }]
