main.js 503 B

123456789101112131415161718192021222324252627
  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. import request from 'utils/request.js'
  8. Vue.prototype.$http = request.http
  9. Vue.prototype.$ajax = request.ajax
  10. Vue.prototype.$baseURL = request.baseURL
  11. const app = new Vue({
  12. ...App
  13. })
  14. app.$mount()
  15. // #endif
  16. // #ifdef VUE3
  17. import { createSSRApp } from 'vue'
  18. export function createApp() {
  19. const app = createSSRApp(App)
  20. return {
  21. app
  22. }
  23. }
  24. // #endif