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 circleLimit = r => require.ensure([], () => r(require('../views/system/circle-limit.vue')), 'circle-limit')
const addManager = r => require.ensure([], () => r(require('../views/education/add-manager.vue')), 'add-manager')
const editManager = r => require.ensure([], () => r(require('../views/education/edit-manager.vue')), 'edit-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')
const editCme = r => require.ensure([], () => r(require('../views/education/edit-cme.vue')), 'edit-cme')
const editProfessionalExam = r => require.ensure([], () => r(require('../views/education/edit-professional-exam.vue')), 'edit-professional-exam')
const subjectManager = r => require.ensure([], () => r(require('../views/education/subject-manager.vue')), 'subject-manager')
const editSubject = r => require.ensure([], () => r(require('../views/education/edit-subject.vue')), 'edit-subject')
const reportDownload = r => require.ensure([], () => r(require('../views/education/report-download.vue')), 'report-download')


import patientsRouters from './patients'
import followRouters from './follow'

const reportLisOld = r => require.ensure([], () => r(require('../views/learning-o/report-list.vue')), 'report-list-old')
const itemListOld = r => require.ensure([], () => r(require('../views/learning-o/item-list.vue')), 'item-list-old')
const nameListOld = r => require.ensure([], () => r(require('../views/learning-o/name-list.vue')), 'name-list-old')
const dataAlignmentOld = r => require.ensure([], () => r(require('../views/learning-o/data-alignment.vue')), 'data-alignment-old')
const exportDownloadOld = r => require.ensure([], () => r(require('../views/learning-o/export-download.vue')), 'export-download-old')

const reportLis = r => require.ensure([], () => r(require('../views/learning/report-list.vue')), 'report-list')
const itemList = r => require.ensure([], () => r(require('../views/learning/item-list.vue')), 'item-list')
const nameList = r => require.ensure([], () => r(require('../views/learning/name-list.vue')), 'name-list')
const dataAlignment = r => require.ensure([], () => r(require('../views/learning/data-alignment.vue')), 'data-alignment')
const exportDownload = r => require.ensure([], () => r(require('../views/learning/export-download.vue')), 'export-download')

const itemShield = r => require.ensure([], () => r(require('../views/education/item-shield.vue')), 'item-shield')
const entryManager = r => require.ensure([], () => r(require('../views/education/entry-manager.vue')), 'entry-manager')
const editEntry = r => require.ensure([], () => r(require('../views/education/edit-entry.vue')), 'edit-entry')
const editNotice = r => require.ensure([], () => r(require('../views/education/edit-notice.vue')), 'edit-notice')

const creditManage = r => require.ensure([], () => r(require('../views/cme/credit-manage.vue')), 'credit-manage')
const reviewAccessManage = r => require.ensure([], () => r(require('../views/cme/review-access-manage.vue')), 'review-access-manage')
const creditSendManage = r => require.ensure([], () => r(require('../views/cme/credit-send-manage.vue')), 'credit-send-manage')
const applyDetail =  r => require.ensure([], () => r(require('../views/cme/apply-detail.vue')), 'apply-detail')

const templateManager = r => require.ensure([], () => r(require('../views/education/template-manager.vue')), 'ctemplate-manager')
const templateEditor = r => require.ensure([], () => r(require('../views/education/template-editor.vue')), 'template-editor')
const templateOpen = r => require.ensure([], () => r(require('../views/education/template-open.vue')), 'templateOpen')
const eduRole = r => require.ensure([], () => r(require('../views/education/edu-role.vue')), 'edu-role')
const editCustom = r => require.ensure([], () => r(require('../views/education/edit-custom.vue')), 'templateOpen')
const externalResourceManage = r => require.ensure([], () => r(require('../views/education/external-resource-manage.vue')), 'external-resource-manage')
const auditCustomCourse = r => require.ensure([], () => r(require('../views/education/audit-custom-course.vue')), 'audit-custom-course')
const advertSimpleManage = r => require.ensure([], () => r(require('../views/education/advert/advert-simple-manage.vue')), 'advert-simple-manage')
const editSimpleAdvert = r => require.ensure([], () => r(require('../views/education/advert/edit-simple-advert.vue')), 'edit-simple-advert')

const noticeEditor = r => require.ensure([], () => r(require('../views/education/notice-editor.vue')), 'notice-editor')

const activityManagement = r => require.ensure([], () => r(require('../views/activitymanagement/activity-management.vue')), 'activity-management')
const createActivity = r => require.ensure([], () => r(require('../views/activitymanagement/create-activity.vue')), 'create-activity')

const yqRange = r => require.ensure([], () => r(require('../views/yqrange/yq-range.vue')), 'yq-range')
const liveManage = r => require.ensure([], () => r(require('../views/yqrange/live-manage.vue')), 'live-manage')
const roleManage = r => require.ensure([], () => r(require('../views/yqrange/role-manage.vue')), 'role-manage')
const createRange = r => require.ensure([], () => r(require('../views/yqrange/create-range.vue')), 'create-range')
const rangeManage = r => require.ensure([], () => r(require('../views/yqrange/range-manage.vue')), 'range-manage')
const editRange = r => require.ensure([], () => r(require('../views/yqrange/edit-range.vue')), 'edit-range')
const createLive = r => require.ensure([], () => r(require('../views/yqrange/create-live.vue')), 'create-live')
const blackListManage = r => require.ensure([], () => r(require('../views/yqrange/blacklist-manage.vue')), 'blacklist-manage')
const adminManage = r => require.ensure([], () => r(require('../views/yqrange/admin-manage.vue')), 'admin-manage')
const rangeApply = r => require.ensure([], () => r(require('../views/yqrange/range-apply.vue')), 'rangeApply')

const shopList = r => require.ensure([], () => r(require('../views/shop/shop-list.vue')), 'shop-list')
const createShop = r => require.ensure([], () => r(require('../views/shop/create-shop.vue')), 'create-shop')
const goodsManage = r => require.ensure([], () => r(require('../views/goods/goods-manage.vue')), 'goods-manage')
const freightConfig = r => require.ensure([], () => r(require('../views/freight/freight-config.vue')), 'freight-config')
const createGood = r => require.ensure([], () => r(require('../views/goods/create-good.vue')), 'create-good')
const orderManage = r => require.ensure([], () => r(require('../views/goods/order-manage.vue')), 'order-manage')
const orderDetail = r => require.ensure([], () => r(require('../views/goods/order-detail.vue')), 'order-detail')
const plazaList = r => require.ensure([], () => r(require('../views/plaza/plaza-list.vue')), 'plaza-list')
const activityMember = r => require.ensure([], () => r(require('../views/activitymanagement/activity-member.vue')), 'activity-member')

const videoManage = r => require.ensure([], () => r(require('../views/shortvideo/video-manage.vue')), 'video-manage')

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: '/edit-manager',
            component: editManager
        },{
            path: '/edit-cme',
            component: editCme
        },{
          path: '/edit-professional-exam',
          component: editProfessionalExam
        },{
            path: '/subject-manager',
            component: subjectManager
        },{
            path: '/report-download',
            component: reportDownload
        },{
          path: '/edit-subject',
          component: editSubject
        },{
            path: '/item-component',
            component: itemComponent
        },{
            path: '/role',
            component: roleManager
        },{
            path: '/circle-limit',
            component: circleLimit
        },{
            path: '/create-component',
            component: createComponent
        },{
            path: '/item-role',
            component: itemRole
        }
        ,{
            path: '/report-list',
            component: reportLis
        },{
            path: '/item-list',
            component: itemList
        },{
            path: '/data-alignment',
            component: dataAlignment
        },{
            path: '/name-list',
            component: nameList
        },
        {
            path: '/export-download',
            component: exportDownload
        },

        {
            path: '/report-list-old',
            component: reportLisOld
        },{
            path: '/item-list-old',
            component: itemListOld
        },{
            path: '/data-alignment-old',
            component: dataAlignmentOld
        },{
            path: '/name-list-old',
            component: nameListOld
        },
        {
            path: '/export-download-old',
            component: exportDownloadOld
        },

        {
            path: '/item-shield',
            component: itemShield,
        },
        {
            path: '/entry-manager',
            component: entryManager,
        },
        {
            path: '/edit-entry',
            component: editEntry,
        },
        {
            path: '/msg-push',
            component: msgPush,
            // redirect: 'msgpush/msg-push',
        },
        {
            path: '/edit-notice',
            component: editNotice,
            // redirect: 'msgpush/msg-push',
        },
        {
            path: '/credit-manage',
            component: creditManage,
        },
        {
            path: '/review-access-manage',
            component: reviewAccessManage,
        },
        {
            path: '/credit-send-manage',
            component: creditSendManage,
        },
        {
            path: '/apply-detail',
            component: applyDetail,
        },
        {
            path: '/template-manager',
            component: templateManager
        },
        {
            path: '/template-editor',
            component: templateEditor
        },
        {
            path: '/template-open',
            component: templateOpen
        },
        {
            path: '/edit-custom',
            component: editCustom
        },
        {
            path: '/edu-role',
            component: eduRole
        },
        {
            path: '/notice-editor',
            component: noticeEditor
        },
        {
            path: '/yq-range',
            component: yqRange
        },
        {
            path: '/activity-management',
            component: activityManagement
        },
        {
            path:'/create-activity',
            component: createActivity

        },
        {
            path: '/live-manage',
            component: liveManage
        },
        {
            path: '/role-manage',
            component: roleManage
        },
        {
            path: '/admin-manage',
            component: adminManage
        },
        {
            path: '/create-range',
            component: createRange
        },
        {
            path: '/range-manage',
            component: rangeManage
        },
        {
        path: '/range-apply',
        component: rangeApply
        },
        {
            path: '/create-live',
            component: createLive
        },
        {
            path:'/edit-range',
            component: editRange
        },
        {
            path: '/blacklist-manage',
            component: blackListManage
        },
        {
            path: '/external-resource-manage',
            component: externalResourceManage,
        },
        {
            path: '/audit-custom-course',
            component: auditCustomCourse,
        },
        {
            path: '/advert-simple-manage',
            component: advertSimpleManage,
        },
        {
            path: '/edit-simple-advert',
            component: editSimpleAdvert,
        },
        {
            path: '/shop-list',
            component: shopList,
        },
        {
            path: '/create-shop',
            component: createShop,
        },
        {
            path: '/order-manage',
            component: orderManage,
        },
        {
            path: '/goods-manage',
            component: goodsManage,
        },
        {
        path: '/freight-config',
        component: freightConfig,
        },
        {
            path: '/create-good',
            component: createGood,
        },
        {
            path: '/order-detail',
            component: orderDetail,
        },
        {
            path: '/plaza-list',
            component: plazaList,
        },
        {
            path: '/activity-member',
            component: activityMember,
        },
        {
            path: 'video-manage',
            component: videoManage,
        },

      // {
      //   path: '/followup',
      //   name: 'followUp',
      //   component: followUp,
      //   redirect: 'followup/plan-manage/planList',
      // },
        followRouters,
        patientsRouters,
    ]
  }]
