main.js 647 B

123456789101112131415161718192021222324252627282930313233343536
  1. import App from './App'
  2. import request from 'utils/request.js' //引入异步请求函数
  3. Vue.prototype.request = request.request //挂载到全局
  4. import uView from "uview-ui";
  5. Vue.config.productionTip = false;
  6. Vue.config.productionTip = false;
  7. Vue.prototype.url = request.baseUrl;
  8. Vue.prototype.$EventBus = new Vue();
  9. // #ifndef VUE3
  10. import Vue from 'vue'
  11. Vue.config.productionTip = false
  12. App.mpType = 'app'
  13. Vue.use(uView);
  14. const app = new Vue({
  15. ...App
  16. })
  17. app.$mount()
  18. // #endif
  19. // #ifdef VUE3
  20. import { createSSRApp } from 'vue'
  21. export function createApp() {
  22. const app = createSSRApp(App)
  23. return {
  24. app
  25. }
  26. }
  27. // #endif