main.js 626 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 = 'http://pet.hdlkeji.com/api';
  8. // #ifndef VUE3
  9. import Vue from 'vue'
  10. Vue.config.productionTip = false
  11. App.mpType = 'app'
  12. Vue.use(uView);
  13. const app = new Vue({
  14. ...App
  15. })
  16. app.$mount()
  17. // #endif
  18. // #ifdef VUE3
  19. import { createSSRApp } from 'vue'
  20. export function createApp() {
  21. const app = createSSRApp(App)
  22. return {
  23. app
  24. }
  25. }
  26. // #endif