fix: resolve header overlap on Dynamic Island iPhones
- app.js 通过 wx.getSystemInfoSync 获取 statusBarHeight 存入 globalData
- 所有12个自定义导航页面的 JS 读取 statusBarHeight
- WXML 通过 style="padding-top: {{statusBarHeight + 24}}px" 动态适配
- 普通手机和灵动岛手机都能正确显示
这个提交包含在:
@@ -4,6 +4,7 @@ var app = getApp()
|
||||
|
||||
Page({
|
||||
data: {
|
||||
statusBarHeight: 44,
|
||||
sessionId: '',
|
||||
regions: 0,
|
||||
duration: 0,
|
||||
@@ -15,6 +16,7 @@ Page({
|
||||
},
|
||||
|
||||
onLoad: function (options) {
|
||||
this.setData({ statusBarHeight: app.globalData.statusBarHeight })
|
||||
var durationMs = parseInt(options.duration) || 0
|
||||
var mins = Math.floor(durationMs / 60000)
|
||||
var secs = Math.floor((durationMs % 60000) / 1000)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<view class="page">
|
||||
<view class="page-header page-header-green">
|
||||
<view class="page-header page-header-green" style="padding-top: {{statusBarHeight + 24}}px;">
|
||||
<view class="page-header-title">护理完成</view>
|
||||
<view class="page-header-subtitle">本次护理已结束</view>
|
||||
</view>
|
||||
|
||||
在新工单中引用
屏蔽一个用户