buddhism/main.js

67 lines
1.4 KiB
JavaScript
Raw Normal View History

2023-12-05 16:45:28 +08:00
import Vue from 'vue'
2023-11-27 09:57:03 +08:00
import App from './App'
2023-12-05 16:45:28 +08:00
import cookies from 'weapp-cookie'
import uView from "uview-ui";
2024-03-13 10:54:22 +08:00
2023-12-05 16:45:28 +08:00
// http接口API集中管理引入部分
2024-03-13 10:54:22 +08:00
// import httpApi from '@/common/http.api.js'
2023-12-05 16:45:28 +08:00
import store from "./store/index.js"
import './uni.scss';
// 公共样式与字体图标
import './common/css/common.css'
import'./common/css/iconfont.css'
2023-11-27 09:57:03 +08:00
2023-12-05 16:45:28 +08:00
import md5 from 'js-md5'
// 引入公共组件 tabbar
2024-01-23 19:15:52 +08:00
import tabbar from '@/components/tab-bar/tab-bar.vue';
2023-12-05 16:45:28 +08:00
// import customizeAnswer from'@/components/customizeAnswer/customizeAnswer.vue'
// Vue.use('customizeAnswer',customizeAnswer)
2024-01-23 19:15:52 +08:00
Vue.use('tab-bar',tabbar)
2023-12-05 16:45:28 +08:00
Vue.use(uView);
Vue.use(cookies);
2025-07-29 17:56:31 +08:00
Vue.config.productionTip = false
2023-12-05 16:45:28 +08:00
Vue.prototype.$md5 = md5;
2023-11-27 09:57:03 +08:00
App.mpType = 'app'
2023-12-05 16:45:28 +08:00
// #ifdef APP-PLUS
Vue.prototype.$store = store
// #endif
2024-03-13 10:54:22 +08:00
const app = new Vue({
store,
render: h => h(App),
}).$mount('#app');
import httpConfig from '@/common/http.config.js'
Vue.use(httpConfig, app)
// 初始化全局loading管理器
2025-08-02 15:05:23 +08:00
import { initGlobalLoadingManager } from '@/utils/request.js'
initGlobalLoadingManager()
2024-03-13 10:54:22 +08:00
// Vue.use(httpApi, app)
2023-12-05 16:45:28 +08:00
// #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)
}
});
})
}
2025-08-01 18:33:52 +08:00
2023-11-27 09:57:03 +08:00
// #endif
2023-12-05 16:45:28 +08:00
2024-03-13 10:54:22 +08:00
// app.$mount()