import Vue from 'vue';
import Router from 'vue-router';
import {getRoutes} from "@/common/utils";


Vue.use(Router);

const router = new Router({
  mode:'hash',
  base: process.env.VUE_APP_BUILD_BASE_URL,
  routes:[
    {
      path: '/',
      component: () => import('../index.vue'),
      children: [
        {
          path: '',
          component: () => import('../views/index'),
          meta:{
            title:'首页'
          },
        },
        ...getRoutes(require.context('@/apps/manage/views', true, /\/router\.js$/))
      ]
    }
  ]
})

export default router