// 获取状态栏高度
var statuBar = uni.getSystemInfoSync().statusBarHeight;
// 获取胶囊数据
var custom = wx.getMenuButtonBoundingClientRect()
// 获取胶囊的宽高
customWidth = custom.width
customHeight = custom.height
// 获取胶囊的上下左右坐标
customTop = custom.top
customBottom = cutsom.bottom
customLeft = custom.left
customRight = custom.right
// 获取导航栏(标题栏高度)高度
= 胶囊高度+(顶部距离-状态栏高度)*2
var navigationBarHeight = custom.height + (custom.top - statuBar) * 2
// 总体高度 = 状态栏高度+导航栏高度
var navAllHeight = navigationBarHeight + statuBar