import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'index',
    component: () => import( '@/views/index.vue'),
    children:[
      // 首页
      {
        path: 'home',
        name: 'Home',
        component: () => import( '@/views/pages/home.vue'),
        meta: {
          title: '首页',
          keepAlive: true
        }
      },
      // 走进中业
      {
        path: 'introduce',
        name: 'Introduce',
        component: () => import( '@/views/pages/introduce.vue'),
        meta: {
          title: '走进中业',
          keepAlive: true
        }
      },
      // 走进中业
      {
        path: 'information',
        name: 'Information',
        component: () => import( '@/views/pages/information.vue'),
        meta: {
          title: '资讯中心',
          keepAlive: true
        }
      },
       // 资质证书
       {
        path: 'honor',
        name: 'honor',
        component: () => import( '@/views/pages/honor.vue'),
        meta: {
          title: '资讯中心',
          keepAlive: true
        }
      },
      // 资质证书
      {
        path: 'cases',
        name: 'cases',
        component: () => import( '@/views/pages/cases.vue'),
        meta: {
          title: '资讯中心',
          keepAlive: true
        }
      },
      // 资质证书
      {
        path: 'recruit',
        name: 'recruit',
        component: () => import( '@/views/pages/recruit.vue'),
        meta: {
          title: '人才招聘',
          keepAlive: true
        }
      }
    ]
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
