|
|
@@ -2,18 +2,20 @@
|
|
|
// 获取屏幕边界到安全区域距离
|
|
|
let systemInfo
|
|
|
let safeAreaInsets
|
|
|
+const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
|
|
|
|
|
|
// #ifdef MP-WEIXIN
|
|
|
// 微信小程序使用新的API
|
|
|
systemInfo = uni.getWindowInfo()
|
|
|
+console.log(9990, systemInfo)
|
|
|
safeAreaInsets = systemInfo.safeArea
|
|
|
- ? {
|
|
|
- top: systemInfo.safeArea.top,
|
|
|
- right: systemInfo.windowWidth - systemInfo.safeArea.right,
|
|
|
- bottom: systemInfo.windowHeight - systemInfo.safeArea.bottom,
|
|
|
- left: systemInfo.safeArea.left,
|
|
|
+ ? {
|
|
|
+ top: systemInfo.safeArea.top,
|
|
|
+ right: systemInfo.windowWidth - systemInfo.safeArea.right,
|
|
|
+ bottom: systemInfo.windowHeight - systemInfo.safeArea.bottom,
|
|
|
+ left: systemInfo.safeArea.left,
|
|
|
}
|
|
|
- : null
|
|
|
+ : null
|
|
|
// #endif
|
|
|
|
|
|
// #ifndef MP-WEIXIN
|
|
|
@@ -35,4 +37,4 @@ console.log('systemInfo', systemInfo)
|
|
|
// windowHeight: 753
|
|
|
// windowTop: 0
|
|
|
// windowWidth: 390
|
|
|
-export { safeAreaInsets, systemInfo }
|
|
|
+export { menuButtonInfo, safeAreaInsets, systemInfo }
|