App({
onLaunch(){
let _this = this
wx.getSystemInfo({
success(res) => {
// 获取胶囊按钮信息
let circle = wx.getMenuButtonBoundingClientRect()
_this.globalData.ButtonBoundingPadding = circle.top - res.statusBarHeight
_this.globalData.ButtonBoundingTop = circle.top
_this.globalData.ButtonBoundingHeight = circle.height
}
})
},
globalData:{
ButtonBoundingPadding: 0,
ButtonBoundingTop: 0,
ButtonBoundingHeight: 0
}
})
微信小程序 存储手机状态栏高度
- 本文作者: 真实の幻梦
- 本文链接: https://nancy-svy.github.io/post/statusBarHeight/
- 版权声明: 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
0%
召唤看板娘
x
感谢您的支持,我会继续努力的!
扫码打赏,你说多少就多少