main.js 480 B

123456789101112131415161718192021222324252627282930
  1. import App from './App'
  2. import http from './utils/http.js'
  3. import api from './config/api.js'
  4. import moment from './utils/moment.js'
  5. uni.$http = http;
  6. uni.$api = api;
  7. uni.$moment = moment;
  8. // #ifndef VUE3
  9. import Vue from 'vue'
  10. Vue.config.productionTip = false
  11. App.mpType = 'app'
  12. const app = new Vue({
  13. ...App
  14. })
  15. app.$mount()
  16. // #endif
  17. // #ifdef VUE3
  18. import {
  19. createSSRApp
  20. } from 'vue'
  21. export function createApp() {
  22. const app = createSSRApp(App)
  23. return {
  24. app
  25. }
  26. }
  27. // #endif