四零语境前端代码仓库
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.

49 lines
1.1 KiB

1 month ago
1 month ago
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 scrollTo from '@/plugins/scrollTo'
  11. import store from '@/stores'
  12. Vue.config.productionTip = false
  13. // 全局混入获取配置相关信息的方法
  14. Vue.mixin(MixinConfig)
  15. // 全局注册弹窗组件
  16. // Vue.component('GlobalPopup', GlobalPopup)
  17. // 将插件挂载到Vue中
  18. Vue.use(scrollTo)
  19. // 将api挂载到Vue的原型
  20. Vue.prototype.$api = api
  21. Vue.prototype.$utils = utils
  22. Vue.prototype.$config = config // 这里是静态config
  23. // #ifdef H5
  24. import jWeixin from '@/utils/lib/jweixin-module.js'
  25. Vue.prototype.$jWeixin = jWeixin // 这里偷偷挂载
  26. // #endif
  27. App.mpType = 'app'
  28. const app = new Vue({
  29. ...App,
  30. store
  31. })
  32. app.$mount()
  33. // #endif
  34. // #ifdef VUE3
  35. import { createSSRApp } from 'vue'
  36. export function createApp() {
  37. const app = createSSRApp(App)
  38. return {
  39. app
  40. }
  41. }
  42. // #endif