24 lines
1.4 KiB
Markdown
24 lines
1.4 KiB
Markdown
# 2026-07-10 TAC 弹层居中修复计划
|
||
|
||
- 计划编号:PC-020
|
||
- 开始时间:2026-07-10 11:11:05 +08:00
|
||
- 页面范围:`login.html`、`register.html`、`forgot-password.html`
|
||
- 接口范围:`/captcha/require`、`/captcha/challenge`、`/captcha/verify`
|
||
- 约束:不修改 `public/tac`,不新增验证码自定义样式,不传 TAC 视觉配置,只调整 Layui 弹层调用参数。
|
||
|
||
## 根因
|
||
|
||
Layui 打开页面层时,`content` 里的验证码挂载点还是空节点;TAC 后续异步创建自己的 `#tianai-captcha-parent`,该原生外层尺寸是 `318px * 318px`。Layui 已经按空内容完成定位,所以最终验证码窗口会偏离预期位置。
|
||
|
||
## 执行清单
|
||
|
||
1. [x] 写失败测试:要求验证码弹层通过 Layui `area` 预留 `318px * 318px`,并保持默认居中。
|
||
2. [x] 修改 `captcha-pages.js`:只给 `layer.open` 增加 TAC 原生尺寸和默认居中参数。
|
||
3. [x] 运行焦点测试、结构测试、语法检查和空白检查。
|
||
4. [x] 将完成结果同步回 `pc-api-page-integration-tracker-2026-07-09.md`。
|
||
|
||
## 验证记录
|
||
|
||
- 2026-07-10 11:11:05 +08:00:`node tests\captcha-pages.test.js` 已按预期失败,失败点为 `layerOptions.area` 缺失。
|
||
- 2026-07-10 11:14:31 +08:00:修复后 `node tests\captcha-pages.test.js`、`node tests\auth-page-structure.test.js`、`node --check public\js\captcha-pages.js` 均通过;`git diff --check` 无空白错误,仅有既有 LF/CRLF 换行提示。
|