木邻有你前端代码仓库
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.

43 lines
870 B

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months 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. App.mpType = 'app'
  21. const app = new Vue({
  22. ...App,
  23. store
  24. })
  25. app.$mount()
  26. // #endif
  27. // #ifdef VUE3
  28. import { createSSRApp } from 'vue'
  29. export function createApp() {
  30. const app = createSSRApp(App)
  31. return {
  32. app
  33. }
  34. }
  35. // #endif