import Vue from 'vue'
import App from './App'



// OSS静态资源
Vue.prototype.$iImgUrl = 'https://szcf.superbest.wang/xcxImages/'


//http请求
import http from '@/common/js/http.js'
Vue.prototype.$http = http


// 时间处理模块
import dayjs from 'dayjs'
Vue.prototype.$day = dayjs


// OSS静态资源
Vue.prototype.$ImgUrl = 'https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/';


// #ifdef H5
import Vant from 'vant';
Vue.use(Vant);


// echarts图标
// var echarts = require('echarts')
// Vue.prototype.$echarts = echarts
// console.log(echarts);

// 微信JSSDK
// import jweixin from 'jweixin-module'
// Vue.prototype.$jweixin = jweixin
// console.log(jweixin);
import VConsole from 'vconsole';
// const vConsole = new VConsole();

//加载es5>>js
function loadJs(path, callback) {
	let secScript = document.createElement("script");
	secScript.setAttribute("src", path);
	secScript.setAttribute("async", "async");
	document.body.insertBefore(secScript, document.body.lastChild);
	secScript.onload = callback;
	if (secScript.readyState) {
		// IE
		secScript.onreadystatechange = function() {
			if (secScript.readyState === 'loaded' || secScript.readyState === 'complete') {
				secScript.onreadystatechange = null;
				callback();
			}
		};
	} else {
		//其他浏览器
		secScript.onload = callback;
	}
}
// //JQ
// loadJs("//s1.pstatp.com/cdn/expire-1-M/jquery/1.8.0/jquery-1.8.0.min.js")
// // 微信-WEUI框架
// loadJs("//res.wx.qq.com/open/libs/weuijs/1.2.1/weui.min.js")
// // 公众号js-sdk
// loadJs("//res.wx.qq.com/open/js/jweixin-1.6.0.js")
// // 二维码生成
// loadJs("//static.runoob.com/assets/qrcode/qrcode.min.js")

// #endif

Vue.config.productionTip = false

App.mpType = 'app'

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