6.4 KiB
A06 登录状态 Implementation Plan
For agentic workers: REQUIRED SUB-SKILL: Use
superpowers:executing-plansto implement this plan task-by-task. Steps use checkbox (- [ ]) syntax for tracking. 用户禁止子代理、worktree、Git 暂存、提交、推送与上传。
Goal: 将 A06 做成可通过一个 status 路由参数表达六种真实认证结果、并可返回正确认证步骤的独立页面。
Architecture: pages/auth/a06-auth-status.vue 独立拥有状态配置、H5 查询参数解析和最小本地交互;它不再依赖 ModulePage 或 data/page-catalog.js。页面复用已验收认证位图资产,保留单一 A06 路由,避免为每个状态新建页面。
Tech Stack: Vue 3 <script setup>、uni-app、SCSS、PowerShell 源码契约、Chrome DevTools 截图。
Global Constraints
- 仅修改 A06、它的契约、设计记录、规划/交接/资产台账和 A06 运行截图。
- 不生成新资产;完整页面壳、面板、主按钮、边框与装饰面均引用现有位图,不以 CSS 伪造。
- 不修改已验收并冻结的 A01、G01、A02、A04、A05 可见效果。
- 手机号绑定不在本轮实现;它后续位于个人中心安全设置的独立页面。
- 先红灯、后绿灯;完成前截图审视、回归并运行
git diff --check。
Task 1: 固化 A06 多状态合同并替换通用页
Files:
- Create:
tests/a06-auth-status-contract.ps1 - Modify:
pages/auth/a06-auth-status.vue - Modify:
data/page-catalog.js
Interfaces:
-
Consumes:
?status=normal|failed|restricted|register-pending|wechat-cancelled|wechat-failed、认证位图资产、A02 登录页、A04 注册页。 -
Produces:
resolveStatus、goLogin、goRegister、handlePrimary、goBack;未知状态必须回退为normal。 -
Step 1: 写失败的最小契约
创建 tests/a06-auth-status-contract.ps1,读取 pages.json、A06 源码与 data/page-catalog.js,断言:A06 路由仍存在、源码不含 ModulePage、目录不再含 a06:;六个 ASCII 状态键与四个动作函数存在;页面引用现有认证壳、面板、主按钮、云纹、分隔结、返回箭头和登录轮廓位图;面板和主按钮不使用 CSS border/background 伪造;A02 与 A04 路由存在。
- Step 2: 运行红灯
运行:
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a06-auth-status-contract.ps1
预期:因当前 A06 仍渲染 ModulePage、目录仍有 a06: 而失败。
- Step 3: 写最小独立实现
将 pages/auth/a06-auth-status.vue 改为认证状态页:用 status 查询键选择六条文案;每个状态仅给出一项可执行的下一步;restricted 的帮助只显示本地待接入提示;register-pending 去 A04;其余主操作及次操作去 A02。删除 data/page-catalog.js 的 a06: 临时条目。
- Step 4: 运行绿灯
运行:
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a06-auth-status-contract.ps1
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/compile-audit.ps1
预期:输出 A06-AUTH-STATUS-CONTRACT PASS 与 PASS compile audit。
Task 2: 记录、真实截图与回归
Files:
- Create:
docs/design/A06_登录状态_设计记录.md - Create:
docs/design/screens/runtime/2026-07-14/A06-after-360x800.png - Create:
docs/design/screens/runtime/2026-07-14/A06-after-412x915.png - Create:
docs/design/screens/runtime/2026-07-14/A06-restricted-360x800.png - Modify:
docs/规划.md - Modify:
docs/交接记录.md - Modify:
docs/design/P00_页面结构与资产清单.md - Modify:
docs/design/视觉设计交接手册.md
Interfaces:
-
Consumes: Task 1 的
status状态合同和 Chrome CDP 9222。 -
Produces: 可审查截图、交接记录和等待用户验收的 A06。
-
Step 1: 记录设计边界
写 A06 设计记录,包含六状态映射、复用资产、未接入后端/客服/申诉能力、A02/A04 回流、截图位置和“等待用户审美验收”状态。
- Step 2: 捕获并审视真实页面
运行:
node scripts/capture-chrome-page.js "http://localhost:5173/#/pages/auth/a06-auth-status" ".auth-page" "docs/design/screens/runtime/2026-07-14/A06-after-360x800.png" 360 800
node scripts/capture-chrome-page.js "http://localhost:5173/#/pages/auth/a06-auth-status" ".auth-page" "docs/design/screens/runtime/2026-07-14/A06-after-412x915.png" 412 915
node scripts/capture-chrome-page.js "http://localhost:5173/#/pages/auth/a06-auth-status?status=restricted" ".auth-page" "docs/design/screens/runtime/2026-07-14/A06-restricted-360x800.png" 360 800
逐张审视认证头图、卷轴面板、状态图形、主/次操作、底部留白、横向裁切和黑块;用 Chrome 实测默认返回登录、受限状态帮助提示、未完成注册去 A04。
- Step 3: 同步与完整回归
更新规划、交接、资产台账与视觉手册,明确 A06 已实现并等待用户审美验收。运行:
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a06-auth-status-contract.ps1
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a05-reset-password-contract.ps1
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a04-registration-contract.ps1
powershell.exe -NoProfile -ExecutionPolicy Bypass -File tests/a03-route-removal-contract.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/a02-asset-alpha-audit.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
预期:全部通过;git diff --check 允许已有 CRLF 提示,但退出码必须为 0。用户已于 2026-07-14 明确验收 A06,故已同步为可见效果冻结。
自审
- 规格的六个状态、单一路由、资产限制、A02/A04 回流、截图与等待验收均被两个任务覆盖。
- 本计划不含 TODO/TBD/“同 Task N”占位语,函数名和状态键在两个任务中一致。
- 不提交 Git:项目规则覆盖计划模板中的提交建议。