import Vue from 'vue'
import mobile from './mobile.vue';
import router from './router'
import store from './store'
import md5 from 'js-md5';
import sensors from "./util/sensors";
import 'lib-flexible'
import NP from 'number-precision';
import 'vant/lib/index.css';
import filters from './common/filter'
import './common/loadVant'
import './common/loadTemps';
import VueWechatTitle from 'vue-wechat-title'
import {
  Overlay,
  Popup,
  ActionSheet,
  RadioGroup,
  CellGroup,
  Cell,
  Radio,
  Field,
  NoticeBar,
  Checkbox,
  Swipe,
  SwipeItem
} from 'vant';
Vue.use(Swipe).use(SwipeItem).use(Overlay).use(Popup).use(ActionSheet).use(CellGroup).use(RadioGroup).use(Cell).use(Radio).use(Field).use(NoticeBar).use(Checkbox)

Vue.config.productionTip = false

// 全局过滤器
Object.keys(filters).forEach(filterName => {
  Vue.filter(filterName, filters[filterName])
});
Vue.use(VueWechatTitle)

// 神策埋点
Vue.prototype.$sensors = sensors
Vue.prototype.$md5 = md5;
Vue.prototype.$NP = NP;

new Vue({
  router,
  store,
  render: h => h(mobile)
}).$mount('#mobile')