西藏巴青项目

App.vue 898B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <script>
  2. import { syncUserOnLaunch } from '@/permission'
  3. import { installTabBarApiGuard } from '@/utils/tabBar'
  4. export default {
  5. onLaunch() {
  6. installTabBarApiGuard()
  7. syncUserOnLaunch().catch(() => {})
  8. },
  9. onShow() {
  10. console.log('App Show')
  11. },
  12. onHide() {
  13. console.log('App Hide')
  14. }
  15. }
  16. </script>
  17. <style lang="scss">
  18. /* 须写在首行:与 uni.scss 中的 theme 配合,否则 index 内 $u-* 未定义 */
  19. @import 'uview-plus/index.scss';
  20. @import '@/styles/app-lang.scss';
  21. /* 全屏高度链:H5 若写死 page height:100%,易与原生 tabBar 抢高度导致底栏「看不见」 */
  22. /* #ifdef H5 */
  23. page {
  24. min-height: 100%;
  25. height: auto;
  26. box-sizing: border-box;
  27. background-color: #f0ebe5;
  28. }
  29. /* #endif */
  30. /* #ifndef H5 */
  31. page {
  32. height: 100%;
  33. min-height: 100%;
  34. background-color: #f0ebe5;
  35. }
  36. /* #endif */
  37. </style>