import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    name: 'index',
    meta: { title: '首页' },
    component: () => import('../views/index.vue'),
  },
  {
    path: '/list',
    name: 'index',
    meta: { title: '更多' },
    component: () => import('../views/list.vue'),
  },
  {
    path: '/kjzx',
    name: 'index',
    meta: { title: '科技资讯' },
    component: () => import('../views/kjzx/index.vue'),
  },
  {
    path: '/kjpx',
    name: 'index',
    meta: { title: '科技培训' },
    component: () => import('../views/kjpx/index.vue'),
  },
  {
    path: '/kjzy',
    name: 'index',
    meta: { title: '科技资源' },
    component: () => import('../views/kjzy/index.vue'),
  },
  {
    path: '/kjfw',
    name: 'index',
    meta: { title: '科技服务' },
    component: () => import('../views/kjfw/index.vue'),
  },
];

const router = new VueRouter({
  mode: 'history',
  base: process.env.NODE_ENV === 'development' ? '' : 'newsaltai',
  routes,
});

export default router;
