main.js 538 B

123456789101112131415161718192021222324252627282930
  1. // #ifndef VUE3
  2. import Vue from 'vue'
  3. import uView from '@/uni_modules/uview-ui'
  4. import App from './App'
  5. import BASEURL from './utils/api.js'
  6. Vue.prototype.$BASEURL = BASEURL
  7. Vue.config.productionTip = false
  8. App.mpType = 'app'
  9. Vue.use(uView)
  10. // uni.$u.config.unit = 'rpx'
  11. const app = new Vue({
  12. ...App
  13. })
  14. require('./utils/request/index')(app)
  15. app.$mount()
  16. // #endif
  17. // #ifdef VUE3
  18. import {
  19. createSSRApp
  20. } from 'vue'
  21. import App from './App.vue'
  22. export function createApp() {
  23. const app = createSSRApp(App)
  24. return {
  25. app
  26. }
  27. }
  28. // #endif