import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from "@/components/Index"

import DataStatis from "@/views/DataStatis/Index"

Vue.use(VueRouter)

const router = new VueRouter({
    routes: [
        {
            path: '/', component: Index, redirect: "/dataStatis",
            children: [

                {
                    path: '', component: DataStatis,
                    meta: {
                        title: '企业检测大屏'
                    }
                },


            ],

        },



    ]
})
router.beforeEach((to, from, next) => {
    if (to.meta.title) {
        document.title = to.meta.title
    }
    next()
})
export default router