main.js 642 B

12345678910111213141516171819202122232425262728293031323334
  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. // 图片拼接地址
  10. Vue.prototype.$baseUrl = 'https://bzdcdn.baozhida.cn/';
  11. // #ifndef VUE3
  12. import Vue from 'vue'
  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 { createSSRApp } from 'vue'
  23. export function createApp() {
  24. const app = createSSRApp(App)
  25. return {
  26. app
  27. }
  28. }
  29. // #endif