fix: resolve header overlap on Dynamic Island iPhones

- app.js 通过 wx.getSystemInfoSync 获取 statusBarHeight 存入 globalData
- 所有12个自定义导航页面的 JS 读取 statusBarHeight
- WXML 通过 style="padding-top: {{statusBarHeight + 24}}px" 动态适配
- 普通手机和灵动岛手机都能正确显示
这个提交包含在:
Guoguo
2026-04-24 22:20:10 +08:00
父节点 36e80d503a
当前提交 52cb1f72dc
修改 26 个文件,包含 69 行新增15 行删除
@@ -2,6 +2,7 @@ var http = require('../../utils/request')
Page({
data: {
statusBarHeight: 44,
plans: [
{ plan: 'monthly', price: '¥99', desc: '约3.3元/天' },
{ plan: 'yearly', price: '¥899', desc: '省¥289' }
@@ -10,6 +11,11 @@ Page({
purchasing: false
},
onLoad: function () {
var app = getApp()
this.setData({ statusBarHeight: app.globalData.statusBarHeight })
},
onSelect: function (e) {
this.setData({ selected: e.currentTarget.dataset.plan })
},
@@ -1,5 +1,5 @@
<view class="page">
<view class="page-header page-header-gold">
<view class="page-header page-header-gold" style="padding-top: {{statusBarHeight + 24}}px;">
<view class="page-header-title">订阅服务</view>
<view class="page-header-subtitle">解锁智能模式</view>
</view>