main.js 637 B

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