App.vue 959 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <script>
  2. import { runColdStart, runForeground, runBackground } from '@/core/bootstrap/app-launch'
  3. import appSettings from '@/core/config/app-settings'
  4. import { createPushBridge } from '@/features/push/push-bridge'
  5. import { markAppInBackground } from '@/features/feed/background-playback'
  6. export default {
  7. globalData: {
  8. runtimeConfig: {},
  9. targetVideoId: '',
  10. _i18n: {},
  11. isAndroid: true
  12. },
  13. onLaunch() {
  14. // #ifdef APP-PLUS
  15. if (appSettings.nativePushEnabled) {
  16. this.$pushBridge = createPushBridge(this)
  17. }
  18. // #endif
  19. runColdStart(this)
  20. },
  21. onShow() {
  22. markAppInBackground(false)
  23. runForeground(this)
  24. },
  25. onHide() {
  26. markAppInBackground(true)
  27. runBackground(this)
  28. }
  29. }
  30. </script>
  31. <style lang="scss">
  32. /* #ifndef APP-NVUE */
  33. @import '@/static/style/app-shell.css';
  34. @import '@/static/style/base.css';
  35. @import '@/static/style/colorui.css';
  36. @import './static/style/baselive.css';
  37. @import '@/static/style/iconfont.css';
  38. /* #endif */
  39. </style>