聚星移动端

main.js 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import Vue from 'vue'
  2. import App from './App'
  3. import store from './store'
  4. import '@/static/iconfont/iconfont.css'
  5. import { getDay,NumberHandle,formatNum,formateHours } from '@/config/common.js'
  6. import {show_init_loading,hide_init_loading,nav_back} from '@/config/uniInfo.js'
  7. import theEnd from '@/components/theEnd.vue'
  8. import noData from '@/components/noData.vue'
  9. Vue.component('noData',noData)
  10. Vue.component('theEnd', theEnd)
  11. Vue.config.productionTip = false
  12. Vue.prototype.$getDay = getDay;
  13. Vue.prototype.$formatNum = formatNum;
  14. Vue.prototype.$NumberHandle = NumberHandle;
  15. Vue.prototype.$formateHours = formateHours;
  16. Vue.prototype.$show_init_loading = show_init_loading
  17. Vue.prototype.$hide_init_loading = hide_init_loading
  18. Vue.prototype.$nav_back = nav_back
  19. Vue.prototype.$store = store
  20. //app.vue里的onLaunch中如果有异步方法,比如登录方法,返回结果可能会在页面的 onLoad 之后,
  21. // 为了让页面的 onLoad 在 onLaunch 之后执行 https://blog.csdn.net/weixin_39152200/article/details/109179581
  22. Vue.prototype.$onLaunched = new Promise(resolve=>{
  23. Vue.prototype.$isResolve = resolve
  24. })
  25. // Vue.prototype.$backgroundAudioData = {
  26. // playing: false,
  27. // playTime: 0,
  28. // formatedPlayTime: '00:00:00'
  29. // }
  30. App.mpType = 'app'
  31. const app = new Vue({
  32. store,
  33. ...App
  34. })
  35. app.$mount()