import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter)

const routes = [
    {
        path:'*',
        redirect: '/login'
    },
    {
        path:'/login',
        name:'Login',
        component:() =>import('../views/login.vue')
    },
    {
        path:'/',
        name:'Main',
        component:() => import('../views/Main.vue'),
        redirect: '/login',
        children:[
            {
                path:'/home',
                name:'home',
                component:()=>import('../views/Home')
            },
            {
                path:'/isolationpoint',
                name:'IsolationPoint',
                component:()=> import('../views/IsolationPoint')
            },
            {
                path:'/admissionapplyman',
                name:'AdmissionApplyMan',
                component:()=>import('../views/AdmissionApplyMan')
            },
            {
                path:'/laboratory',
                name:'Laboratory',
                component:()=> import('../views/Laboratory')
            },
            {
                path:'/admissionapply',
                name:'AdmissionApply',
                component:()=>import('../views/AdmissionApply')
            }
        ]
    }
]

const router = new VueRouter({
    mode:'history',
    routes
})

export default router