|
|
|
|
@ -49,8 +49,7 @@ export default class Navbar extends Component<any, any> {
|
|
|
|
|
success: (res) => {
|
|
|
|
|
const statusBarHeight = res.statusBarHeight || 0;
|
|
|
|
|
// 获取微信胶囊的位置信息 width,height,top,right,left,bottom
|
|
|
|
|
// const custom = Taro.getMenuButtonBoundingClientRect();
|
|
|
|
|
const custom = { height: 60, top: 20 };
|
|
|
|
|
const custom = Taro.getMenuButtonBoundingClientRect();
|
|
|
|
|
// 导航栏高度(标题栏高度) = 胶囊高度 + (顶部距离 - 状态栏高度) * 2
|
|
|
|
|
const navigationBarHeight =
|
|
|
|
|
custom.height + (custom.top - statusBarHeight) * 2;
|
|
|
|
|
|