1、页面顶部导航 安卓和苹果表现形式不一样,苹果居中,安卓居左
2、自定义顶部导航时获取距离顶部的高度
wx.getMenuButtonBoundingClientRect().top;
//计算页面内容区域距离顶部Bar的距离 wx.getSystemInfo({ success:(res:any)=>{ let statusBarHeight:any; statusBarHeight = res.statusBarHeight; this.height = statusBarHeight + wx.getMenuButtonBoundingClientRect().height + (wx.getMenuButtonBoundingClientRect().top-statusBarHeight )*2 } })