This commit is contained in:
Neo
2026-03-15 10:15:02 +08:00
parent 2dd217522c
commit 72bb11b34f
916 changed files with 65306 additions and 16102803 deletions

View File

@@ -0,0 +1,37 @@
# 基准测试历史记录
> 本文件记录 H5→MP 迁移项目的 Benchmark 基准测试历史,仅供参考。
> 完整推导过程见 `docs/miniprogram-dev/03-reference/benchmark-history.md`(本文件即为迁移后的版本,原 `docs/h5_ui/compare/HISTORY.md` 已归档)。
---
## 当前有效参数v3
| 参数 | H5 | MP | 说明 |
|------|-----|-----|------|
| viewport | 430×752 | 430×752 | 统一视口 |
| DPR | 1.5 | 1.5 | 双端一致 |
| 输出尺寸 | 645×1128 | 645×1128 | 零缩放 |
| rpx 系数 | — | 1:1.75 | `rpx = px × 2 × 0.875` |
## v3 基准测试结果2026-03-11
| 组 | 差异率 | 说明 |
|---|---|---|
| g1裁剪后 | 3.87% | 全部来自不可消除的系统性因素 |
差异来源:字体渲染 ~2% + 行内元素高度 ~1% + rpx 取偶 ~0.5% + 抗锯齿 ~0.5%
## 版本演进
| 版本 | 日期 | rpx 系数 | 状态 |
|------|------|---------|------|
| v2 | 2026-03-10 | 1:1.82750/412 | ❌ 废弃视口不一致、有损缩放、DPR 不对等) |
| v3 | 2026-03-11 | 1:1.75750/430 工程近似) | ✅ 当前有效 |
## 结论
1. `rpx = px × 2 × 0.875`1:1.75)是正确的迁移换算公式
2. 双端截图参数必须统一viewport=430×752, DPR=1.5
3. 像素对比的背景噪音基线约 3.87%
4. <5% 通过目标在基线之上仅有 ~1% 修正空间,公式和参数已高度准确

View File

@@ -0,0 +1,53 @@
# 各页面特殊结构速查表
> 基于 H5 源码扫描得出。处理对应页面时直接查表,不需要重新扫描。
---
| 页面 | safe-area-top | bottomNav | ai-float | position:fixed | ::before/::after | 其他风险 |
|---|---|---|---|---|---|---|
| board-finance | ✅ | ✅ | ✅ | ✅(筛选下拉) | ✅tab 指示线) | `backdrop-filter: blur()` |
| board-coach | ✅ | ✅ | ✅ | ✅(筛选下拉) | ✅tab 指示线) | — |
| board-customer | ✅ | ✅ | ✅ | ✅(筛选下拉) | ✅tab 指示线) | CSS 渐变文字 |
| task-list | — | ✅ | ✅ | ✅(筛选下拉) | — | — |
| task-detail | — | — | — | — | ✅(气泡尖角) | — |
| task-detail-callback | — | — | — | — | — | — |
| task-detail-priority | — | — | — | — | — | — |
| task-detail-relationship | — | — | — | — | — | — |
| my-profile | ✅ | ✅ | — | — | — | — |
| coach-detail | — | — | — | — | — | — |
| customer-detail | — | — | — | — | ✅ | — |
| customer-service-records | — | — | ✅ | — | — | — |
| performance | — | — | ✅ | — | — | — |
| performance-records | — | — | ✅ | — | — | — |
| notes | ✅ | — | — | — | — | — |
| chat | ✅ | — | — | — | — | — |
| chat-history | ✅ | — | — | — | — | — |
| reviewing | — | — | — | — | — | `data:image/svg` |
| no-permission | — | — | — | — | — | `data:image/svg` |
✅ = 存在该结构,需按规则处理;— = 不存在。
---
## 处理规则速查
| 结构 | MP 处理方式 |
|------|-----------|
| `.safe-area-top` | 去除 `padding-top: env(safe-area-inset-top, 44px)`MP 由 navigationBar 处理 |
| `#bottomNav` | 不迁移MP 用原生 tabBarH5 截图时隐藏 |
| `.ai-float-btn-container` | 双端截图前隐藏 |
| `<dev-fab />` | MP 截图前 `wx:if="{{false}}"` |
| `.filter-overlay` | 优先用组件遮罩层 |
| `.tab-active::after` | 额外 `<view>` 模拟 |
| `.speech-bubble::after` | 绝对定位 `<view>` + `transform: rotate(45deg)` |
| `data:image/svg+xml` | 导出 PNG/base64 或用 CSS 渐变模拟 |
---
## 页面导航栏模式
| 模式 | 页面 |
|------|------|
| A系统默认 navBar | board-finance, board-coach, board-customer, task-list, my-profile |
| B自定义 navBar | task-detail 系列, coach-detail, customer-detail, performance, notes, chat, chat-history, customer-service-records, performance-records |