import Vue from "vue";
import App from "./App.vue";
import "@/plugins";
import i18n from "./i18n";
import store from "./store";

//把vuex定义成全局组件
Vue.prototype.$store = store;
Vue.prototype._i18n = i18n;
Vue.prototype.$date = function (time) {
	if(!time) return
	let dateStr = time.split(' ')[0]
	let timeStr = time.split(' ')[1]
	let dateArr = dateStr.split('-')
	let str = dateArr[2]+'/'+dateArr[1]+'/'+dateArr[0] +' '+timeStr
	
	return str
}

Vue.config.productionTip = false;

App.mpType = "app";

const app = new Vue({
  ...App,
  i18n,
  store,
});
app.$mount();
