buddhism/main.js

69 lines
1.5 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'
2025-08-14 11:22:53 +08:00
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'
2025-08-14 11:22:53 +08:00
import store from './store/index.js'
import './uni.scss'
2023-12-05 16:45:28 +08:00
// 公共样式与字体图标
import './common/css/common.css'
2025-08-14 11:22:53 +08:00
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
2025-08-14 11:22:53 +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)
2025-08-14 11:22:53 +08:00
Vue.use('tab-bar', tabbar)
2023-12-05 16:45:28 +08:00
2025-08-14 11:22:53 +08:00
Vue.use(uView)
Vue.use(cookies)
2025-07-29 17:56:31 +08:00
Vue.config.productionTip = false
2025-08-14 11:22:53 +08:00
Vue.prototype.$md5 = md5
2023-12-05 16:45:28 +08:00
2023-11-27 09:57:03 +08:00
App.mpType = 'app'
2023-12-05 16:45:28 +08:00
// #ifdef APP-PLUS
2025-08-14 11:22:53 +08:00
Vue.prototype.$store = store
2023-12-05 16:45:28 +08:00
// #endif
2025-08-14 11:22:53 +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
2025-08-14 11:22:53 +08:00
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)
},
})
})
2023-12-05 16:45:28 +08:00
}
2025-08-01 18:33:52 +08:00
2023-11-27 09:57:03 +08:00
// #endif
2024-03-13 10:54:22 +08:00
// app.$mount()
2025-08-07 17:30:36 +08:00
import PageScrollMixin from './mixins/page-scroll-mixin.js'
// 注册全局 mixin
Vue.mixin(PageScrollMixin)