84 lines
3.3 KiB
Markdown
84 lines
3.3 KiB
Markdown
# G 类型页面 C 背景贴底自适应 Implementation Plan
|
||
|
||
> **For agentic workers:** 本计划由当前主代理在同一会话内执行;用户明确禁止多代理、worktree、git add、commit、push、reset 和 checkout。
|
||
|
||
**Goal:** 让现有 C 背景保持完整比例并贴底显示,把山水视觉集中到 G 页面下半区,减少加入申请区域的大块纯色空白。
|
||
|
||
**Architecture:** 保持 `GenealogyPageBackground.vue` 为 9 个 G 页面的唯一背景入口,不增加图片资产。只把现有图片从 `top: 0` 改为 `bottom: 0`,继续使用 `widthFix` 和满屏宣纸底色。
|
||
|
||
**Tech Stack:** uni-app、Vue 单文件组件、CSS、PowerShell 契约测试、Chrome CDP 截图。
|
||
|
||
## Global Constraints
|
||
|
||
- 只使用现有 `genealogy-page-background.png`,不生成或重做图片。
|
||
- 背景完整显示、左右不裁剪、不拉伸。
|
||
- 9 个活动 G 页面继续共用一个公共组件。
|
||
- 不改变 G01 内容、卡片、交互、路由或固定区/滚动区结构。
|
||
- 不使用多代理或 worktree,不执行任何 Git 写操作。
|
||
|
||
---
|
||
|
||
### Task 1: 背景贴底契约与最小实现
|
||
|
||
**Files:**
|
||
- Modify: `tests/genealogy-shared-background-contract.ps1`
|
||
- Modify: `components/GenealogyPageBackground.vue`
|
||
|
||
**Interfaces:**
|
||
- Consumes: 现有公共背景组件和 C 运行资产。
|
||
- Produces: `bottom: 0`、全宽、`widthFix` 的固定背景图层。
|
||
|
||
- [ ] **Step 1: 写失败契约**
|
||
|
||
在公共背景契约中要求 `.genealogy-page-background__art` 包含 `bottom: 0`,并禁止 `top: 0`。
|
||
|
||
- [ ] **Step 2: 运行契约确认失败**
|
||
|
||
Run: `powershell -NoProfile -ExecutionPolicy Bypass -File tests/genealogy-shared-background-contract.ps1`
|
||
|
||
Expected: 因当前组件仍使用 `top: 0` 而失败。
|
||
|
||
- [ ] **Step 3: 最小修改公共组件**
|
||
|
||
将图片定位从 `top: 0` 改为 `bottom: 0`,不修改资产、宽度、模式、层级或 9 个页面。
|
||
|
||
- [ ] **Step 4: 运行契约确认通过**
|
||
|
||
Run: `powershell -NoProfile -ExecutionPolicy Bypass -File tests/genealogy-shared-background-contract.ps1`
|
||
|
||
Expected: `PASS G genealogy shared background contract`。
|
||
|
||
### Task 2: 运行截图与回归
|
||
|
||
**Files:**
|
||
- Modify: `design-qa.md`
|
||
- Modify: `docs/交接记录.md`
|
||
- Modify: `docs/验收规划.md`
|
||
- Runtime evidence: `docs/design/screens/runtime/2026-07-16/`
|
||
|
||
**Interfaces:**
|
||
- Consumes: 贴底公共背景组件。
|
||
- Produces: 四档 G01 H5 内部候选截图和未验收状态记录。
|
||
|
||
- [ ] **Step 1: 四档真实截图**
|
||
|
||
在 320×568、360×640、360×800、412×915 下截取 G01,确认完整画面贴底、上方宣纸区被主要内容覆盖、下方申请区域不再大块空白。
|
||
|
||
- [ ] **Step 2: 源图与实现同轮对照**
|
||
|
||
同一比较输入内打开 C 源图与 412×915 实现截图,确认无裁剪、无拉伸、无横向溢出和文字对比度问题。
|
||
|
||
- [ ] **Step 3: 回归验证**
|
||
|
||
Run: `powershell -NoProfile -ExecutionPolicy Bypass -File tests/genealogy-shared-background-contract.ps1`
|
||
|
||
Run: `powershell -NoProfile -ExecutionPolicy Bypass -File tests/g01-visual-contract.ps1`
|
||
|
||
Run: `powershell -NoProfile -ExecutionPolicy Bypass -File tests/full-page-visual-contract.ps1`
|
||
|
||
Run: G01、G03、G05、G06、G08-G10、G11-G12 现有运行 smoke。
|
||
|
||
Run: `git diff --check`
|
||
|
||
Expected: 所有命令退出码为 0;仍明确缺少 Android/HBuilderX 真机或模拟器复核。
|