import Vue from 'vue' import App from './App' import cookies from 'weapp-cookie' import uView from "uview-ui"; import httpInterceptor from '@/common/http.interceptor.js' // 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 // 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, ...App }) 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()