import Vue from 'vue'
import Router from 'vue-router'
import routerBefore from '@/config/routerBefore.js'
// 主要
import main from '@/components/main.vue'
// 系统配置管理
import ADMINISTRATORS1 from '../components/ADMINISTRATORS1.vue'

Vue.use(Router)

const constantRouterMap = [
  {
    path: '/',
    name: 'main',
    meta: {title: '首页', code: 'xtpzgl'},
    component: main,
    redirect: {name: 'ADMINISTRATORS1'},
    children: [
      {path: 'ADMINISTRATORS1', name: 'ADMINISTRATORS1', meta: {code: 'xtpzgl-jggl'}, component: ADMINISTRATORS1}
    ]
  }
];

const router = new Router({
  routes: constantRouterMap
})
//  before
routerBefore(router, constantRouterMap);

export default router;
//  constantRouterMap
export const routes = constantRouterMap;
