main.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import App from './App'
  2. import store from './store'
  3. import dd from '@/static/dd.js'
  4. import moment from "moment"
  5. import ElementUI from 'element-ui';
  6. import 'element-ui/lib/theme-chalk/index.css';
  7. // #ifndef VUE3
  8. import Vue from 'vue'
  9. import Http from './common/js/http.js'
  10. Vue.use(ElementUI);
  11. // main.js
  12. import uView from "uview-ui"
  13. Vue.use(uView)
  14. Vue.prototype.$api = Http;
  15. Vue.config.productionTip = false
  16. Vue.prototype.$store = store
  17. Vue.prototype.$backgroundAudioData = {
  18. playing: false,
  19. playTime: 0,
  20. formatedPlayTime: '00:00:00'
  21. }
  22. Vue.prototype.$dd = dd
  23. Vue.prototype.$moment=moment
  24. window.wx = {}
  25. App.mpType = 'app'
  26. const app = new Vue({
  27. store,
  28. ...App
  29. })
  30. app.$mount()
  31. // #endif
  32. // #ifdef VUE3
  33. import {
  34. createSSRApp
  35. } from 'vue'
  36. export function createApp() {
  37. const app = createSSRApp(App)
  38. app.use(store)
  39. app.config.globalProperties.$adpid = "1111111111"
  40. app.config.globalProperties.$backgroundAudioData = {
  41. playing: false,
  42. playTime: 0,
  43. formatedPlayTime: '00:00:00'
  44. }
  45. return {
  46. app
  47. }
  48. }
  49. // #endif