import Vue from 'vue'; import VueRouter from 'vue-router'; Vue.use(VueRouter); const routes = [ { path: '/', name: 'frame', component: () => import('@/views/index.vue'), children: [ { path: '/list', name: 'test_list', component: () => import('@/views/test/list.vue'), }, { path: '/detail', name: 'test_detail', component: () => import('@/views/test/detail.vue'), }, { path: '/itembank/detail', name: 'itembank_detail', component: () => import('@/views/Itembank/detail.vue'), }, { path: '/itembank/index', name: 'itembank_index', component: () => import('@/views/Itembank/index.vue'), }, { path: '/questionnaire/index', name: 'questionnaire_index', component: () => import('@/views/questionnaire/index.vue'), }, { path: '/questionnaire/detail', name: 'questionnaire_detail', component: () => import('@/views/questionnaire/detail.vue'), }, { path: '/teacher/detail', name: 'teacher_detail', component: () => import('@/views/teacher/detail.vue'), }, { path: '/teacher/index', name: 'teacher_index', component: () => import('@/views/teacher/index.vue'), }, { path: '/teacher/means', name: 'teacher_means', component: () => import('@/views/teacher/means.vue'), }, { path: '/work/detail', name: 'work_detail', component: () => import('@/views/work/detail.vue'), }, { path: '/work/index', name: 'work_index', component: () => import('@/views/work/index.vue'), }, { path: '/work/look', name: 'work_look', component: () => import('@/views/work/look.vue'), }, { path: '/work/lookdetail', name: 'work_lookdetail', component: () => import('@/views/work/lookdetail.vue'), }, { path: '/subject/index', name: 'subject_index', component: () => import('@/views/subject/index.vue'), }, { path: '/subject/detail', name: 'subject_detail', component: () => import('@/views/subject/detail.vue'), }, { path: '/director/index', name: 'director_index', component: () => import('@/views/director/index.vue'), }, { path: '/director/detail', name: 'director_detail', component: () => import('@/views/director/detail.vue'), }, { path: '/dept/index', name: 'dept_index', component: () => import('@/views/dept/index.vue'), }, { path: '/dept/detail', name: 'dept_detail', component: () => import('@/views/dept/detail.vue'), }, { path: '/place/index', name: 'place_index', component: () => import('@/views/place/index.vue'), }, { path: '/place/detail', name: 'place_detail', component: () => import('@/views/place/detail.vue'), }, { path: '/bedroom/index', name: 'bedroom_index', component: () => import('@/views/bedroom/index.vue'), }, { path: '/bedroom/detail', name: 'bedroom_detail', component: () => import('@/views/bedroom/detail.vue'), }, { path: '/classes/index', name: 'classes_index', component: () => import('@/views/classes/index.vue'), }, { path: '/classes/detail', name: 'classes_detail', component: () => import('@/views/classes/detail.vue'), }, { path: '/student/index', name: 'student_index', component: () => import('@/views/student/index.vue'), }, { path: '/student/detail', name: 'student_detail', component: () => import('@/views/student/detail.vue'), }, ], }, ]; const router = new VueRouter({ mode: 'history', base: process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROOT_URL + 'center', routes, }); export default router;