main.js 543 B

1234567891011121314151617181920212223242526272829303132
  1. import App from './App'
  2. // #ifndef VUE3
  3. import Vue from 'vue'
  4. import './uni.promisify.adaptor'
  5. import request from './common/request.js'
  6. Vue.use(request);
  7. Vue.config.productionTip = false
  8. // Vue.prototype.$request = '121212'
  9. App.mpType = 'app'
  10. const app = new Vue({
  11. ...App
  12. })
  13. app.$mount()
  14. // #endif
  15. // #ifdef VUE3
  16. import request from './common/request.js'
  17. import { createSSRApp } from 'vue'
  18. export function createApp() {
  19. const app = createSSRApp(App)
  20. app.config.globalProperties.$request=request
  21. return {
  22. app
  23. }
  24. }
  25. // #endif