修复ios 状态栏错位

修复ios 状态栏错位
This commit is contained in:
weilanwl
2019-09-17 02:03:28 +08:00
parent 0b10b63a47
commit cec4e9f600
9 changed files with 39 additions and 15 deletions

View File

@@ -36,9 +36,13 @@ App({
wx.getSystemInfo({
success: e => {
this.globalData.StatusBar = e.statusBarHeight;
let custom = wx.getMenuButtonBoundingClientRect();
this.globalData.Custom = custom;
this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
let capsule = wx.getMenuButtonBoundingClientRect();
if (capsule) {
this.globalData.Custom = capsule;
this.globalData.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight;
} else {
this.globalData.CustomBar = e.statusBarHeight + 50;
}
}
})
},