import {
	createApp
} from 'vue';
import App from './App.vue';
import router from './router';
import vant from 'vant';
import 'vant/lib/index.css';
import './assets/styles/common.scss';
import store from './store';
import Vconsole from 'vconsole';
let vConsole = new Vconsole()
//NFC
router.beforeEach((to, from, next) => {
	let token = window.localStorage.getItem('token')
	let user = window.localStorage.getItem('userInfo')
	if (token && user) {
		next();
	} else {
		if (to.name == 'login') next()
		else next('/')
	}
})

// .use(vConsole)
createApp(App).use(vant).use(router).use(store).mount('#app');