ok
This commit is contained in:
15
app.js
15
app.js
@@ -22,12 +22,21 @@ App({
|
||||
|
||||
const that = this;
|
||||
// 获取系统信息
|
||||
const systemInfo = wx.getSystemInfoSync();
|
||||
// const systemInfo = wx.getSystemInfoSync();
|
||||
|
||||
const windowInfo = wx.getWindowInfo()
|
||||
|
||||
|
||||
// 胶囊按钮位置信息
|
||||
const menuButtonInfo = wx.getMenuButtonBoundingClientRect();
|
||||
// 导航栏高度 = 状态栏高度 + 44
|
||||
that.globalData.navBarHeight = systemInfo.statusBarHeight + 44;
|
||||
that.globalData.menuRight = systemInfo.screenWidth - menuButtonInfo.right;
|
||||
// that.globalData.navBarHeight = systemInfo.statusBarHeight + 44;
|
||||
that.globalData.navBarHeight = windowInfo.statusBarHeight + 44;
|
||||
// that.globalData.menuRight = systemInfo.screenWidth - menuButtonInfo.right;
|
||||
that.globalData.menuRight = windowInfo.screenWidth - menuButtonInfo.right;
|
||||
|
||||
|
||||
|
||||
that.globalData.menuTop = menuButtonInfo.top;
|
||||
that.globalData.menuHeight = menuButtonInfo.height;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user