顶部导航栏的结构:
已知:
- 获取系统信息:wx.getSystemInfoSync()
- 获取胶囊信息:wx.getMenuButtonBoundingClientRect()
wx.getSystemInfoSync().statusBarHeight;//状态栏高度
wx.getMenuButtonBoundingClientRect().height;//胶囊高度
(wx.getMenuButtonBoundingClientRect().top - wx.getSystemInfoSync().statusBarHeight) * 2;//导航栏高度