smartmeter-app/main.js
2024-03-13 10:54:22 +08:00

62 lines
1.3 KiB
JavaScript

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
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()