main.js 545 B

12345678910111213141516171819202122232425262728
  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 { createSSRApp } from 'vue'
  19. import App from './App.vue'
  20. export function createApp() {
  21. const app = createSSRApp(App)
  22. return {
  23. app
  24. }
  25. }
  26. // #endif