main.js 674 B

12345678910111213141516171819202122232425262728293031323334
  1. import App from './App'
  2. // #ifndef VUE3
  3. import Vue from 'vue'
  4. Vue.config.productionTip = false
  5. import http from './utils/http.js'
  6. import share from './utils/share.js'
  7. import * as $request from './apis/request.js'
  8. Vue.prototype.$get = http.get
  9. Vue.prototype.$post = http.post
  10. Vue.prototype.$put = http.put
  11. Vue.prototype.$delete = http.delete
  12. Vue.prototype.$request = $request;
  13. Vue.mixin(share)
  14. App.mpType = 'app'
  15. const app = new Vue({
  16. ...App
  17. })
  18. app.$mount()
  19. // #endif
  20. // #ifdef VUE3
  21. import { createSSRApp } from 'vue'
  22. export function createApp() {
  23. const app = createSSRApp(App)
  24. return {
  25. app
  26. }
  27. }
  28. // #endif
  29. // main.js
  30. import uView from "uview";
  31. Vue.use(uView);