import App from "./App";

// Api函数polyfill(目前为实验版本,如不需要,可删除!)';
import Polyfill from "./polyfill/polyfill";
Polyfill.init();

// 全局mixins,用于实现setData等功能,请勿删除!';
import Mixin from "./polyfill/mixins";
// #ifndef VUE3
import Vue from "vue";
// #ifdef H5
import Vant from "vant";
import "@/common/js/uniRewrite";

//引入vuex
import store from './store'

// 导入全局过滤器
import './common/js/filters'

Vue.use(Vant);
// #endif
Vue.mixin(Mixin);
Vue.prototype.$uiStyle = "normal";
ZWJSBridge.onReady(() => {
  console.log('初始化完成后,执行bridge方法')
  ZWJSBridge.getUiStyle({}).then((result) => {
    // uistyle normal和elder两种模式
    Vue.prototype.$uiStyle = result.uiStyle;
  }).catch(res => {
    console.log('获取uistyle 失败')
 });
})


Vue.config.productionTip = false;
App.mpType = "app";
const app = new Vue({
  ...App,
  store
});
app.$mount();
// #endif