import Vue from 'vue'
import Router from 'vue-router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import classA from '@/components/pages/class'
import course from '@/components/pages/course'
import courseDetail from '@/components/pages/courseDetail'
import data from '@/components/pages/data'
import notice from '@/components/pages/notice'
import student from '@/components/pages/student'
import works from '@/components/pages/works'
import worksDetail from '@/components/pages/worksDetail'
import login from '@/components/login'
import ask from '@/components/pages/ask'
import addCourse from '@/components/pages/addCourse'
import library from '@/components/pages/library'
import note from '@/components/pages/note'
import Grid from '@/components/pages/Grid'
import demo from '@/components/pages/demo'
import classRoom from '@/components/pages/classRoom'
import liveRoom from '@/components/pages/liveRoom'
import liveRoomKQ from '@/components/pages/liveRoomKQ'
import addPPt from '@/components/pages/addPPt'
import studyLibrary from '@/components/pages/studyLibrary'
import evaluation from '@/components/pages/evaluation'
import GridList from '@/components/pages/GridList'
import wordList from '@/components/pages/wordList'
import demoPdf from '@/components/pages/demoPdf'
import demoPdf2 from '@/components/pages/demoPdf2'
import audioDemo from '@/components/pages/audioDemo'
import Ttype from '@/components/pages/Ttype'
import banner from '@/components/pages/banner'
import CaseDesign from '@/components/pages/CaseDesign'
import eventCenter from '@/components/pages/race/eventCenter'
import addRace from '@/components/pages/race/addRace'

Vue.use(Router).use(ElementUI)

export default new Router({
    routes: [{
            path: '/class',
            name: 'class',
            component: classA,
            meta: {
                requireAuth: ''
            }
        },
        // {
        //   path: '/',
        //   redirect: '/course',
        // },
        {
            path: '/course',
            component: course,
            meta: {
                requireAuth: '' // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/course/courseDetail',
            component: courseDetail,
            meta: {
                requireAuth: '' // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/course/addCourse',
            component: addCourse,
            meta: {
                requireAuth: '' // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/data',
            name: 'data',
            component: data,
            meta: {
                requireAuth: '' // 是否需要判断是否登录,这里是需要判断
            }
        }, {
            path: '/notice',
            name: 'notice',
            component: notice,
            meta: {
                requireAuth: '' // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/student',
            name: 'student',
            component: student,
            meta: {
                requireAuth: '' // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/ask',
            name: 'ask',
            component: ask,
            meta: {
                requireAuth: '' // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/ask/askList',
            name: 'askList',
            component: () =>
                import ('@/components/pages/askList'),
            meta: {}
        },
        {
            path: '/works',
            name: 'works',
            component: works,
            meta: {
                requireAuth: '' // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/worksDetail',
            name: 'worksDetail',
            component: worksDetail,
            meta: {
                requireAuth: '' // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/library',
            name: 'library',
            component: library,
            meta: {
                requireAuth: '' // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/login',
            name: 'login',
            component: login,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        },
        {
            path: '/note',
            name: 'note',
            component: note,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        },
        {
            path: '/Grid',
            name: 'Grid',
            component: Grid,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        },
        {
            path: '/demo',
            name: 'demo',
            component: demo,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        },
        {
            path: '/classRoom',
            name: 'classRoom',
            component: classRoom,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        },
        {
            path: '/liveRoom',
            name: 'liveRoom',
            component: liveRoom,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        }, {
            path: '/liveRoomKQ',
            name: 'liveRoomKQ',
            component: liveRoomKQ,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        },
        {
            path: '/addPPt',
            name: 'addPPt',
            component: addPPt,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        },
        {
            path: '/studyLibrary',
            name: 'studyLibrary',
            component: studyLibrary,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        },
        {
            path: '/evaluation',
            name: 'evaluation',
            component: evaluation,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        },
        {
            path: '/GridList',
            name: 'GridList',
            component: GridList,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        },
        {
            path: '/wordList',
            name: 'wordList',
            component: wordList,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        }, {
            path: '/demoPdf',
            name: 'demoPdf',
            component: demoPdf,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        }, {
            path: '/demoPdf2',
            name: 'demoPdf2',
            component: demoPdf2,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        }, {
            path: '/audioDemo',
            name: 'audioDemo',
            component: audioDemo,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        }, {
            path: '/Ttype',
            name: 'Ttype',
            component: Ttype,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        }, {
            path: '/banner',
            name: 'banner',
            component: banner,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        }, {
            path: '/CaseDesign',
            name: 'CaseDesign',
            component: CaseDesign,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        }, {
            path: '/eventCenter',
            name: 'eventCenter',
            component: eventCenter,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        }, {
            path: '/addRace',
            name: 'addRace',
            component: addRace,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        },
    ]
})