|
|
@ -150,10 +150,18 @@ Page({ |
|
|
|
|
|
|
|
|
const systemInfo = wx.getSystemInfoSync(); |
|
|
const systemInfo = wx.getSystemInfoSync(); |
|
|
const screenHeight = systemInfo.screenHeight * 2; |
|
|
const screenHeight = systemInfo.screenHeight * 2; |
|
|
|
|
|
const safeArea = systemInfo.safeArea; |
|
|
const btnHeight = 90; |
|
|
const btnHeight = 90; |
|
|
|
|
|
|
|
|
const minTop = screenHeight * 0.2; |
|
|
let minTop, maxTop; |
|
|
const maxTop = screenHeight * 0.75; |
|
|
|
|
|
|
|
|
if (safeArea && safeArea.top > 20) { |
|
|
|
|
|
minTop = safeArea.top * 2 + 20; |
|
|
|
|
|
maxTop = safeArea.bottom * 2 - btnHeight - 20; |
|
|
|
|
|
} else { |
|
|
|
|
|
minTop = screenHeight * 0.2; |
|
|
|
|
|
maxTop = screenHeight * 0.6; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (newTop < minTop) { |
|
|
if (newTop < minTop) { |
|
|
newTop = minTop; |
|
|
newTop = minTop; |
|
|
|