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

Vue.use(VueRouter)

const routes = [
    // 登陆页面
    {
        path: "/",
        name: "login",
        component: () => import("../views/login")
    },
    // home
    {
        path: "/home",
        name: "home",
        component: () => import("../views/index"),
        children: [
            //手语舞
            {
                path: "first",
                component: () => import("../views/first")
            },
            //概览
            {
                path: "overview",
                component: () => import("../views/overview")
            },
            // 楼层功能
            {
                path: "floorFunc",
                component: () => import("../views/floorFunc")
            },
            // 设备设施
            {
                path: "equipment",
                component: () => import("../views/equipment")
            },
            // 其他功能
            {
                path: "other",
                component: () => import("../views/other")
            },
            // 分析
            {
                path: "analysis",
                component: () => import("../views/analysis")
            }
        ]
    }
]

const router = new VueRouter({
    mode: "history",
    base: process.env.BASE_URL,
    routes
})

export default router
