import Vue from 'vue'
import App from './App'
import store from './store'
import * as Db from './config/db.js';//缓存操作
import * as Util from './config/util.js';//通用方法
import { hex_md5 } from './config/md5.js';//加密
import uView from "uview-ui";
// import baseUrl from "./config/config.js"

Vue.use(uView);

Vue.config.productionTip = false
Vue.prototype.$store = store;
Vue.prototype.$db = Db;
Vue.prototype.$util = Util;
Vue.prototype.$md5 = hex_md5;
Vue.prototype.$global = App.globalData;
// Vue.prototype.$onLaunched = new Promise(resolve => {
//     Vue.prototype.$isResolve = resolve
// })
//在main.js中  
//系统错误捕获  
//if(baseUrl=='https://cygx.hzinsights.com/api'){
	// const errorHandler = (err, vm, info) => {
	// console.error(err);  
	// }  
	// Vue.config.errorHandler = errorHandler;  
	// Vue.prototype.$throw = (error) => errorHandler(error, this);
//}

App.mpType = 'app'

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