import Vue from 'vue'
import VueRouter from 'vue-router'

//公共
import routesCommon from './common'
//业主
import routesMaster from './master'

if (!window.VueRouter) Vue.use(VueRouter)

const routesIndex = [
	//首页
	{
		path: '/',
		name: 'Home',
		component: () => import('../views/Home.vue'),
		meta: {
			requireAuth: false,
			role: [],
			title: '首页',
		}
	},
]

const routes = routesIndex.concat(routesCommon, routesMaster);

const router = new VueRouter({
	//base: process.env.BASE_URL,
	routes
})

export default router
