import Vue from 'vue'
import Router from 'vue-router'
import systemRoute from './system'
import {authUtils} from '@/utils/authUtils'

Vue.use(Router)

let routes = []
routes = routes.concat(systemRoute)

const router = new Router({
  mode: 'history',
  base: '/' + window.__systemConf.baseRouteUrl,
  routes: routes
})

router.beforeEach(new authUtils().routerBeforeEach)

export default router
