main.js 693 B

123456789101112131415161718192021222324252627282930
  1. import App from './App'
  2. // #ifndef VUE3
  3. import Vue from 'vue'
  4. import './uni.promisify.adaptor'
  5. Vue.config.productionTip = false
  6. App.mpType = 'app'
  7. const app = new Vue({
  8. ...App
  9. })
  10. app.$mount()
  11. // #endif
  12. // #ifdef VUE3
  13. import { createSSRApp } from 'vue'
  14. import uviewPlus from 'uview-plus'
  15. import { api, upload } from './util/http.js';
  16. import { domain } from './config/prod'
  17. export function createApp() {
  18. const app = createSSRApp(App)
  19. app.config.globalProperties.$api = api;
  20. app.config.globalProperties.$upload = upload;
  21. app.config.globalProperties.$fileDomain = domain;
  22. app.config.globalProperties.$configSign = 'lrfSelfUse';
  23. app.use(uviewPlus)
  24. return {
  25. app
  26. }
  27. }
  28. // #endif