main.js 734 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import App from './App'
  2. import uView from '@/uni_modules/uview-ui'
  3. import store from './store' // store
  4. import plugins from './plugins' // plugins
  5. import Vue from 'vue'
  6. Vue.use(plugins)
  7. Vue.use(uView)
  8. uni.$u.config.unit = 'rpx'
  9. Vue.config.productionTip = false
  10. Vue.prototype.$store = store
  11. Vue.prototype.ScanAudio = function(){
  12. var music=null;
  13. music=uni.createInnerAudioContext();
  14. music.src='../../static/20221017_084918.m4a';
  15. music.play();
  16. music.onEnded(()=>{
  17. music=null
  18. })
  19. }
  20. // #ifndef VUE3
  21. App.mpType = 'app'
  22. const app = new Vue({
  23. ...App
  24. })
  25. app.$mount()
  26. // #endif
  27. // #ifdef VUE3
  28. import { createSSRApp } from 'vue'
  29. export function createApp() {
  30. const app = createSSRApp(App)
  31. return {
  32. app
  33. }
  34. }
  35. // #endif