import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from '$project/store'

//引入mui
import mui from '$project/assets/js/mui.js'
import '$project/assets/css/mui.min.css'
import Vconsole from 'vconsole'

window.mui = mui;
window.mui.init();

if (location.hostname === 'localhost') {
	Vue.prototype.HTTPLOCAT = ''
} else {
	const http = window.location.protocol + '//' + location.hostname + ':' + location.port
	Vue.prototype.HTTPLOCAT = http + ''
}

router.beforeEach((to, from, next) => {
	if (to.query.test) {
		if (to.query.test == 'test') {
			let vConsole = new Vconsole()
		}
	}
	next();
})

Vue.config.productionTip = false
new Vue({
	router,
	store,
	render: h => h(App)
}).$mount('#app')
