四零语境前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1007 B

1 month ago
1 month ago
  1. import App from './App'
  2. // #ifndef VUE3
  3. // import GlobalPopup from '@/pages/components/GlobalPopup.vue'
  4. import Vue from 'vue'
  5. import './uni.promisify.adaptor'
  6. import * as api from '@/api'
  7. import utils from '@/utils'
  8. import config from '@/config'
  9. import MixinConfig from '@/mixins/config'
  10. import store from '@/stores'
  11. Vue.config.productionTip = false
  12. // 全局混入获取配置相关信息的方法
  13. Vue.mixin(MixinConfig)
  14. // 全局注册弹窗组件
  15. // Vue.component('GlobalPopup', GlobalPopup)
  16. // 将api挂载到Vue的原型
  17. Vue.prototype.$api = api
  18. Vue.prototype.$utils = utils
  19. Vue.prototype.$config = config // 这里是静态config
  20. // #ifdef H5
  21. import jWeixin from '@/utils/lib/jweixin-module.js'
  22. Vue.prototype.$jWeixin = jWeixin // 这里偷偷挂载
  23. // #endif
  24. App.mpType = 'app'
  25. const app = new Vue({
  26. ...App,
  27. store
  28. })
  29. app.$mount()
  30. // #endif
  31. // #ifdef VUE3
  32. import { createSSRApp } from 'vue'
  33. export function createApp() {
  34. const app = createSSRApp(App)
  35. return {
  36. app
  37. }
  38. }
  39. // #endif