This commit is contained in:
wuzilong committed 2026-09-17 09:10:10 +08:00
1 parent a0da6427ef
commit 86694f739f
471 files changed
+62075 -44805

No files matched your search

+13 -1
View File
@@ -7,9 +7,21 @@ const DEFAULT_GAP = 8
const DEFAULT_HORIZONTAL_PADDING = 8
function getSystemInfo() {
// 微信基础库 3.x 起 getSystemInfoSync 已弃用,优先拆分 API
try {
if (typeof uni.getWindowInfo === 'function') {
const win = uni.getWindowInfo() || {}
return {
statusBarHeight: win.statusBarHeight,
windowWidth: win.windowWidth
}
}
} catch (_) {
/* fall through */
}
try {
return uni.getSystemInfoSync() || {}
} catch (error) {
} catch (_) {
return {}
}
}