完成40%

This commit is contained in:
rain
2026-07-14 17:36:39 +08:00
parent 1015e60ff7
commit 8c98936da5
151 changed files with 5132 additions and 351 deletions
@@ -0,0 +1,109 @@
# A02 协议确认控件实施计划
> 现行范围更新:A03 已于 2026-07-14 删除;验证码登录归 A02,绑定手机号归个人中心,微信异常归 A06。历史方案不再作为实现依据。
> **For agentic workers:** 本计划由当前根代理内联执行;用户明确禁止 worktree、子代理、Git 暂存、提交、推送与上传。步骤以复选框追踪。
**Goal:** 在不改变 A01 可见效果的前提下,让 A02 在当前页提供可见、可操作的协议确认并以其状态拦截登录提交。
**Architecture:** A02 页面本地 `agreed` 状态是提交前协议状态的唯一所有者,A01 的 `agreed=1` 只用于初始化。两个 96 × 96 的透明 PNG 负责未选中和选中图标,Vue 负责可点击行、文字、链接与状态切换;不新增协议正文路由。
**Tech Stack:** Vue 3 `<script setup>`、uni-app、SCSS、PowerShell 契约审计、ImageGen、Chrome DevTools 截图。
## Global Constraints
- A01、G01 可见效果冻结;本轮不触碰 A01。
- 完整视觉图标使用真实透明 PNG;不以 CSS 圆环、勾号、伪元素或文本符号替代。
- 先写并运行失败的最小契约,再生成资产或修改页面。
- 不修改 A04--A06,不新增业务接口、协议路由、依赖或 Git 操作。
- A02 已获用户视觉验收,保持可见效果冻结。
---
### Task 1: 固化 A02 协议与资产合同
**Files:**
- Modify: `tests/a01-a02-ui-contract.ps1`
- Modify: `tests/a02-asset-alpha-audit.ps1`
- [x] **Step 1: 写失败的 UI 合同。**
加入以下锚点:`agreement-row``agreement-icon`、两枚 A02 协议图标路径、`const agreed = ref(false)``onLoad/onShow`、H5 `location.hash` 与 Android 页面选项的路由同步、`toggleAgreement``请先阅读并同意相关协议`。拒绝旧提示 `请先在登录引导页阅读并确认协议` 与 A02 协议图标的 CSS `border``background`、伪元素。
- [x] **Step 2: 运行 UI 合同并确认红灯。**
运行:`powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a01-a02-ui-contract.ps1`
预期:因 A02 尚无协议行和图标锚点而失败。
- [x] **Step 3: 写失败的资产审计。**
`tests/a02-asset-alpha-audit.ps1` 对两枚 `static/assets/modules/auth/transparent/a02-agreement-*.png` 逐个验证:存在、96 × 96、`System.Drawing.Image.IsAlphaPixelFormat` 为真、四角 Alpha 为 0,且至少一个像素 Alpha 为 255。
- [x] **Step 4: 运行资产审计并确认红灯。**
运行:`powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a02-asset-alpha-audit.ps1`
预期:因两枚协议图标尚不存在而失败。
### Task 2: 生成并接入透明协议状态资产
**Files:**
- Create: `static/assets/modules/auth/transparent/a02-agreement-unchecked.png`
- Create: `static/assets/modules/auth/transparent/a02-agreement-checked.png`
- Modify: `pages/auth/a02-login.vue`
- [x] **Step 1: 生成未选中与选中图标。**
用 ImageGen 参考 A02 运行截图生成两枚不含文字的圆形古金协议图标:未选中为细古金圆环,选中为朱砂圆印内白色对勾。先用平坦色键背景生成,再移除为透明 PNG;不得保留背景、阴影、边框或水印。
- [x] **Step 2: 仅在资产审计通过后实施 A02。**
模板将旧 `agreement-reminder` 换为可点击 `agreement-row`,内部按 `agreed` 切换两枚 `agreement-icon` 图片;协议文字链接调用 `prepareAgreement` 并停止行点击。脚本以 `agreed` 替代 `agreedFromEntry`,并在 `onLoad/onShow` 同步 H5 当前 hash 或 Android 当前页面选项;`canSubmit` 只判断本页状态。样式只做行尺寸、排版与状态可见性,不画图标。
- [x] **Step 3: 运行绿灯合同。**
运行:
```powershell
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a02-asset-alpha-audit.ps1
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a01-a02-ui-contract.ps1
```
预期:两个脚本均输出 `PASS`
### Task 3: 记录并做运行验证
**Files:**
- Modify: `docs/design/P00_页面结构与资产清单.md`
- Modify: `docs/design/A02_账号登录_设计记录.md`
- Modify: `design-qa.md`
- Create: `docs/design/screens/runtime/2026-07-14/A02-agreement-unchecked-320x568.png`
- Create: `docs/design/screens/runtime/2026-07-14/A02-agreement-unchecked-360x640.png`
- Create: `docs/design/screens/runtime/2026-07-14/A02-agreement-unchecked-360x800.png`
- Create: `docs/design/screens/runtime/2026-07-14/A02-agreement-unchecked-412x915.png`
- Create: `docs/design/screens/runtime/2026-07-14/A02-agreement-checked-360x800.png`
- [x] **Step 1: 更新事实台账。**
在 P00 登记两枚图标的路径、96 × 96 尺寸、transparent 属性、A02 引用位置与保留状态;设计记录和 QA 仅写本轮交互与运行截图,最终状态保持 `blocked`
- [x] **Step 2: 截取并检查两种状态。**
使用专用 Chrome 9222 捕获 A02 直接进入的 320×568、360×640、360×800、412×915 未选中状态,以及 `?agreed=1` 的 360×800 选中状态;逐张打开检查,不接受复用状态、黑块、加载态、裁切或错误图。后续补充的注册入口已在新文档 360×800、412×915 截图中复核。
- [x] **Step 3: 运行受影响验证。**
运行:
```powershell
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a02-asset-alpha-audit.ps1
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a01-a02-ui-contract.ps1
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a02-register-entry-contract.ps1
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/capture-chrome-page-contract.ps1
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/compile-audit.ps1
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/full-page-visual-contract.ps1
git diff --check
```
预期:所有脚本 PASS`git diff --check` 没有真实空白错误。