import Vue from 'vue'
import App from './App'
// import cookies from 'weapp-cookie'
import uView from "uview-ui";

// http接口API集中管理引入部分
// import httpApi from '@/common/http.api.js'
import store from "./store/index.js"
import './uni.scss';
// 公共样式与字体图标
import './common/css/common.css'
import'./common/css/iconfont.css'

// import md5 from 'js-md5'

// 引入公共组件 tabbar
// let vuexStore = require("@/store/$u.mixin.js");
// Vue.mixin(vuexStore);

// 引入uView对小程序分享的mixin封装
let mpShare = require('uview-ui/libs/mixin/mpShare.js');
Vue.mixin(mpShare);

import tabbar from '@/components/tab-bar/tab-bar.vue';

// import customizeAnswer from'@/components/customizeAnswer/customizeAnswer.vue'
// Vue.use('customizeAnswer',customizeAnswer)
Vue.use('tab-bar',tabbar)

Vue.use(uView);
// Vue.use(cookies); 
Vue.config.productionTip = false 
 

// Vue.prototype.$md5 = md5;
 
App.mpType = 'app'

// #ifdef APP-PLUS
	Vue.prototype.$store = store
// #endif

const app = new Vue({  
  store,  
  render: h => h(App),  
}).$mount('#app');
import httpInterceptor from '@/common/http.interceptor.js'
Vue.use(httpInterceptor, app)
// Vue.use(httpApi, app)
// #ifdef MP-WEIXIN
Vue.prototype.wxLogin = async function(){
	console.log("wxLogin")
	return await new Promise(function(reslove, reject) {
		let that = this
		uni.login({
			success: function(res) {
				console.log("main.js==>res",res)
				reslove(res.code)
			}
		}); 
	})		
}
// #endif



// app.$mount()