import Vue from 'vue'
import Router from 'vue-router'
import {
  constantRouterMap,
  asyncRouterMap,
  asyncRouterMap_EN
  
} from '@/config/router.config'
import {lang} from '@/utils/lang'
Vue.use(Router)

export default new Router({
  mode: 'hash',
  base: process.env.BASE_URL,
  scrollBehavior: () => ({
    y: 0
  }),
  routes: constantRouterMap.concat(lang.lg == "en" ? asyncRouterMap_EN : asyncRouterMap)
})
