123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- import Vue from 'vue';
- import Router from 'vue-router';
- Vue.use(Router);
- const router = new Router({
- mode: 'history',
- base: process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROUTER,
- routes: [
- {
- path: '/',
- component: () => import('@/views/index/index.vue'),
- },
- {
- path: '/info',
- component: () => import('@/views/info/index.vue'),
- children: [
- {
- path: 'list/:parent_id',
- 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'),
- },
- ],
- });
- router.afterEach((to, from, next) => {
- window.scrollTo(0, 0);
- });
- export default router;
|