system.js 513 B

12345678910111213141516171819
  1. export default {
  2. data() {
  3. return {
  4. h:uni.getSystemInfoSync().windowHeight,//屏幕高度
  5. mt:uni.getSystemInfoSync().statusBarHeight + 44,//自定义头部组件高度(使用自定义头部组件的上边距)
  6. th:50+uni.getSystemInfoSync().safeAreaInsets.bottom,//底部tabbar高度
  7. imgBase:this.$imgBase
  8. }
  9. },
  10. onShow(){
  11. uni.getSystemInfo({
  12. success:res=>{
  13. if(res.platform === 'android'){
  14. this.th = res.screenHeight - res.windowHeight - res.statusBarHeight - 48;
  15. }
  16. }
  17. })
  18. }
  19. }