import Vue from 'vue';
import VueRouter from 'vue-router';
// 公共
import common from './module/common';
Vue.use(VueRouter);
const routes = [
  {
    path: '/',
    redirect: '/home',
  },
  {
    path: '/home',
    meta: { title: '自由天空', is_filter: true },
    component: () => import('@common/src/components/web-frame/home.vue'),
    children: [
      {
        path: '/home',
        meta: { title: '自由天空', is_filter: true, place: '0' },
        component: () => import('@/views/homeIndex.vue'),
      },
      {
        path: '/solve',
        meta: { title: '解决方案', is_filter: true, place: '1' },
        component: () => import('@/views/solve/index.vue'),
      },
      {
        path: '/brand',
        meta: { title: '品牌理念', is_filter: true, place: '2' },
        component: () => import('@/views/brand/index.vue'),
      },
      {
        path: '/news',
        meta: { title: '新闻资讯', is_filter: true, place: '3' },
        component: () => import('@/views/news/index.vue'),
      },
      {
        path: '/contact',
        meta: { title: '联系我们', is_filter: true, place: '4' },
        component: () => import('@/views/contact/index.vue'),
      },
      {
        path: '/detail/index',
        meta: { title: '详细信息', is_filter: true, place: '4' },
        component: () => import('@/views/detail/index.vue'),
      },
    ],
  },
  ...common,
];
const router = new VueRouter({ mode: 'history', base: process.env.BASE_URL, routes });
export default router;
