main.js 806 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 ElementPlus from "element-plus"
  22. import "element-plus/dist/index.css"
  23. import {
  24. createSSRApp
  25. } from 'vue'
  26. export function createApp() {
  27. const app = createSSRApp(App)
  28. app.use(store)
  29. app.use(ElementPlus)
  30. app.config.globalProperties.$adpid = "1111111111"
  31. app.config.globalProperties.$backgroundAudioData = {
  32. playing: false,
  33. playTime: 0,
  34. formatedPlayTime: '00:00:00'
  35. }
  36. return {
  37. app
  38. }
  39. }
  40. // #endif