main.js 558 B

123456789101112131415161718192021222324252627282930313233
  1. import App from './App'
  2. // 引入全局uView
  3. import uView from 'uview-ui';
  4. Vue.use(uView);
  5. import request from './utils/request.js'
  6. import Storage from './store/storage.js'
  7. Vue.prototype.$api = request
  8. Vue.prototype.$cache = Storage
  9. // #ifndef VUE3
  10. import Vue from 'vue'
  11. import './uni.promisify.adaptor'
  12. Vue.config.productionTip = false
  13. App.mpType = 'app'
  14. const app = new Vue({
  15. ...App
  16. })
  17. app.$mount()
  18. // #endif
  19. // #ifdef VUE3
  20. import {
  21. createSSRApp
  22. } from 'vue'
  23. export function createApp() {
  24. const app = createSSRApp(App)
  25. return {
  26. app
  27. }
  28. }
  29. // #endif