import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
  mode: 'history',
  base: process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROUTER,
  routes: [
    {
      path: '/',
      component: () => import('@/views/index/request.vue'),
    },
    {
      path: '/info',
      component: () => import('@/views/info/index.vue'),
      children: [
        {
          path: 'list',
          component: () => import('@/views/info/list.vue'),
        },
      ],
    },
    {
      path: '/info/detail',
      component: () => import('@/views/info/detail.vue'),
    },
    {
      path: '/jobfair',
      component: () => import('@/views/jobfair/index.vue'),
      children: [
        {
          path: 'list/:type',
          component: () => import('@/views/jobfair/list.vue'),
        },
      ],
    },
    {
      path: '/jobfair/detail',
      component: () => import('@/views/jobfair/detail.vue'),
    },
    {
      path: '/talk',
      component: () => import('@/views/talk/index.vue'),
      children: [
        {
          path: 'list/:type',
          component: () => import('@/views/talk/list.vue'),
        },
      ],
    },
    {
      path: '/talk/detail',
      component: () => import('@/views/talk/detail.vue'),
    },
    {
      path: '/jobinfo',
      component: () => import('@/views/jobinfo/index.vue'),
      children: [
        {
          path: 'list',
          component: () => import('@/views/jobinfo/list.vue'),
        },
      ],
    },
    {
      path: '/jobinfo/detail',
      component: () => import('@/views/jobinfo/detail.vue'),
    },
    {
      path: '/jobs',
      component: () => import('@/views/jobs/index.vue'),
      children: [
        {
          path: 'list/:type',
          component: () => import('@/views/jobs/list.vue'),
        },
      ],
    },
    {
      path: '/jobs/detail',
      component: () => import('@/views/jobs/detail.vue'),
    },
    {
      path: '/corp/detail',
      component: () => import('@/views/corp/index.vue'),
    },
  ],
});
