main.js 706 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import App from './App'
  2. import store from './store'
  3. // #ifndef VUE3
  4. import Vue from 'vue'
  5. Vue.config.productionTip = false
  6. Vue.prototype.$store = store
  7. Vue.prototype.$adpid = "1111111111"
  8. Vue.prototype.$backgroundAudioData = {
  9. playing: false,
  10. playTime: 0,
  11. formatedPlayTime: '00:00:00'
  12. }
  13. App.mpType = 'app'
  14. const app = new Vue({
  15. store,
  16. ...App
  17. })
  18. app.$mount()
  19. // #endif
  20. // #ifdef VUE3
  21. import {
  22. createSSRApp
  23. } from 'vue'
  24. export function createApp() {
  25. const app = createSSRApp(App)
  26. app.use(store)
  27. app.config.globalProperties.$adpid = "1111111111"
  28. app.config.globalProperties.$backgroundAudioData = {
  29. playing: false,
  30. playTime: 0,
  31. formatedPlayTime: '00:00:00'
  32. }
  33. return {
  34. app
  35. }
  36. }
  37. // #endif