西藏巴青项目

App.vue 813B

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