docs(plans): 记录 K19 账号中心交付回执
This commit is contained in:
1 parent
6b5e70e554
commit
28d2679b83
2 files changed
+225
-1
No files matched your search
+56
-1
@@ -20,7 +20,7 @@
|
||||
|
||||
---
|
||||
|
||||
## [待处理] 2026-10-19 | K19 客户端账号中心:资料 / 设备 / 数据导出 / 注销
|
||||
## [已处理·待用户验收] 2026-10-19 | K19 客户端账号中心:资料 / 设备 / 数据导出 / 注销
|
||||
|
||||
**用户指令(2026-10-19)**:「先写 K19 任务书并派单」。
|
||||
> 只改客户端 `ReelShort`。后端、`ReelShortWeb`、`specs`、`main` 一律不动。
|
||||
@@ -123,6 +123,61 @@
|
||||
`flutter build apk --debug` 原始结论、已知缺口(设备下线 / 头像上传 / 注销状态查询),
|
||||
以及「用户可照做的真机验证步骤 + 每步预期结果」。
|
||||
|
||||
### 七、K19 完成回执
|
||||
|
||||
- 客户端分支:`feature/flutter-k19-account`
|
||||
- 功能末提交:`7151bc9`
|
||||
- 合并回 develop:`9b3ab9d`
|
||||
- 已推送:`7d68699..9b3ab9d develop`
|
||||
- author/committer:`Zhou Weidong <502333560@qq.com>`
|
||||
|
||||
六个接口调用集中在 `ReelShort/lib/core/data/remote/account_api.dart`,分别由:
|
||||
|
||||
- `AccountProfilePage` 调 GET/PUT `/app/me`
|
||||
- `AccountDevicesPage` 调 GET `/app/me/devices`
|
||||
- `AccountExportPage` 调 GET `/app/me/export`
|
||||
- `AccountDeactivatePage` 调 POST `/app/me/deactivate` 与 `/deactivate/cancel`
|
||||
|
||||
门禁原始结论:
|
||||
|
||||
```text
|
||||
$ dart analyze lib test
|
||||
No issues found!
|
||||
|
||||
$ flutter test
|
||||
00:26 +335: All tests passed!
|
||||
|
||||
$ flutter build apk --debug
|
||||
Running Gradle task 'assembleDebug'... 10.0s
|
||||
✓ Built build/app/outputs/flutter-apk/app-debug.apk
|
||||
```
|
||||
|
||||
已知缺口:
|
||||
|
||||
- `GET /app/me` 不返回注销申请状态,UI 不判断状态;撤销失败展示后端文案。
|
||||
- 没有设备下线接口,登录设备页只读;`TC-ACCOUNT-10` 的“单点下线”未实现。
|
||||
- 没有头像上传接口,头像只展示;空值使用占位图标。
|
||||
- 资料响应不含生日,当前只支持设置生日,不能回填或清空。
|
||||
|
||||
用户真机验证步骤(设备侧取证由用户执行):
|
||||
|
||||
1. 登录后进入「我的」。
|
||||
预期:钱包卡之后、菜单卡之前显示「账号」卡,包含个人资料 / 登录设备 /
|
||||
数据导出 / 注销账号四项。
|
||||
2. 打开「个人资料」。
|
||||
预期:昵称、性别、UID、脱敏账号、国家、币种、状态、语言、时区、地区回填;
|
||||
修改昵称与性别后保存,返回「我的」后昵称立即更新。
|
||||
3. 打开「登录设备」。
|
||||
预期:设备号脱敏,展示平台、机型、首次/最近活跃时间和状态;无设备时显示空态。
|
||||
4. 打开「数据导出」。
|
||||
预期:展示资料摘要、凭据、授权记录数和设备数;点「复制完整 JSON」出现成功提示。
|
||||
5. 打开「注销账号」。
|
||||
预期:显示 15 天冷静期与立即登出提示;输入原因后必须二次确认。
|
||||
6. 确认注销并重新打开 App。
|
||||
预期:成功页展示预计注销时间,本地会话已清空,App 回到未登录态。
|
||||
7. 重新登录后再次进入「注销账号」,点击「撤销注销申请」。
|
||||
预期:有申请时显示撤销成功;无申请时原样展示后端“没有待处理的注销申请”。
|
||||
|
||||
---
|
||||
|
||||
## [已处理·待用户验收] 2026-10-17 | K16 注册限流改为可配置(支持不限制)
|
||||
|
||||
@@ -2202,6 +2202,175 @@ $ flutter test
|
||||
|
||||
---
|
||||
|
||||
## 34. K19 客户端账号中心
|
||||
|
||||
### 34.1 基线与实施范围
|
||||
|
||||
基线确认:
|
||||
|
||||
```text
|
||||
ReelShort: 7d68699 fix(config): 合并开发默认服务器地址
|
||||
FruitServer: 5c93ba9 docs(plans): 下发 K19 账号中心接口对接任务
|
||||
```
|
||||
|
||||
计划文档先提交为 `6b5e70e docs(plans): 增加 K19 账号中心实施计划`。
|
||||
客户端从干净 develop 创建 `feature/flutter-k19-account`,只对接:
|
||||
|
||||
```text
|
||||
GET /app/me
|
||||
PUT /app/me
|
||||
GET /app/me/devices
|
||||
GET /app/me/export
|
||||
POST /app/me/deactivate
|
||||
POST /app/me/deactivate/cancel
|
||||
```
|
||||
|
||||
接口口径以后端实际代码为准:设备直接返回实体数组;导出返回
|
||||
`profile / credentials / consents / devices`;注销请求只发送 `reason`。
|
||||
|
||||
### 34.2 TDD 与实现
|
||||
|
||||
先用不存在的 `AccountApi/AccountProfile` 跑红灯,确认测试在实现前失败:
|
||||
|
||||
```text
|
||||
Error: Error when reading 'lib/core/data/remote/account_api.dart':
|
||||
No such file or directory
|
||||
Some tests failed.
|
||||
```
|
||||
|
||||
第一批实现后:
|
||||
|
||||
```text
|
||||
$ flutter test test/account/account_api_test.dart
|
||||
00:00 +7: All tests passed!
|
||||
```
|
||||
|
||||
登录态同步先红灯:
|
||||
|
||||
```text
|
||||
Error: The method 'applyProfile' isn't defined for the type 'AuthController'.
|
||||
```
|
||||
|
||||
实现 `applyProfile(AuthUser)` 后:
|
||||
|
||||
```text
|
||||
00:00 +1: All tests passed!
|
||||
```
|
||||
|
||||
逻辑层覆盖资料保存回调、设备读取、导出复制、注销清会话和撤销失败文案:
|
||||
|
||||
```text
|
||||
$ flutter test test/account/account_logic_test.dart
|
||||
00:00 +5: All tests passed!
|
||||
```
|
||||
|
||||
页面与入口先红灯,随后用稳定 Key 实现:
|
||||
|
||||
```text
|
||||
$ flutter test test/account/account_pages_test.dart \
|
||||
test/account/mine_account_entry_test.dart
|
||||
00:01 +6: All tests passed!
|
||||
```
|
||||
|
||||
实现文件:
|
||||
|
||||
```text
|
||||
lib/core/data/remote/account_api.dart
|
||||
lib/core/data/models/account_profile.dart
|
||||
lib/core/data/models/account_device.dart
|
||||
lib/core/data/models/account_export.dart
|
||||
lib/core/data/repositories/account_repository.dart
|
||||
lib/pages/account/*
|
||||
lib/pages/mine/mine_view.dart
|
||||
lib/core/data/services/auth_controller.dart
|
||||
lib/app.dart
|
||||
lib/l10n/app_{en,zh,id}.arb
|
||||
```
|
||||
|
||||
### 34.3 首屏布局回归
|
||||
|
||||
首次全量测试时,新增账号卡把既有偏好设置和观看历史入口挤出可视区:
|
||||
|
||||
```text
|
||||
Found 0 widgets with text "App Language"
|
||||
Found 0 widgets with text "Watch History"
|
||||
Some tests failed.
|
||||
```
|
||||
|
||||
处理:不改既有测试断言,把账号卡收敛为 48px 紧凑横向入口,
|
||||
保留四项图标、分隔线和账号标题;原有菜单项改用紧凑密度。
|
||||
三个受影响测试回归:
|
||||
|
||||
```text
|
||||
$ flutter test test/home/home_nav_ui_test.dart \
|
||||
test/watch/watch_history_provider_test.dart test/widget_test.dart
|
||||
00:06 +21: All tests passed!
|
||||
```
|
||||
|
||||
### 34.4 最终门禁
|
||||
|
||||
```text
|
||||
$ dart analyze lib test
|
||||
Analyzing lib, test...
|
||||
No issues found!
|
||||
```
|
||||
|
||||
```text
|
||||
$ flutter test
|
||||
00:26 +335: All tests passed!
|
||||
```
|
||||
|
||||
```text
|
||||
$ flutter build apk --debug
|
||||
Running Gradle task 'assembleDebug'... 10.0s
|
||||
✓ Built build/app/outputs/flutter-apk/app-debug.apk
|
||||
```
|
||||
|
||||
### 34.5 Git
|
||||
|
||||
```text
|
||||
44f6feb feat(account): 接入个人中心接口模型
|
||||
ef7f4ce feat(account): 同步资料保存后的登录态
|
||||
c68f024 feat(account): 增加账号中心页面逻辑
|
||||
da09511 feat(account): 增加账号中心页面与入口
|
||||
6fce24d refactor(account): 收敛账号页组件结构
|
||||
7151bc9 style(account): 保持账号入口首屏可用
|
||||
9b3ab9d feat(account): 合并 K19 账号中心
|
||||
7d68699..9b3ab9d develop -> develop
|
||||
```
|
||||
|
||||
所有提交 author/committer 均为 `Zhou Weidong <502333560@qq.com>`。
|
||||
|
||||
### 34.6 已知缺口
|
||||
|
||||
- 无注销状态查询:不能预先判断是否在冷静期,撤销失败直接展示后端文案。
|
||||
- 无设备下线接口:设备页只读。
|
||||
- 无头像上传接口:头像只展示。
|
||||
- 资料响应不含生日:本批生日只能本次设置,不能回填或清空。
|
||||
|
||||
### 34.7 用户真机验证
|
||||
|
||||
以下步骤必须在设备侧执行并取证,开发机不代跑:
|
||||
|
||||
1. 登录后打开「我的」。
|
||||
预期:钱包卡后、菜单卡前出现「账号」卡,四项入口完整可点击。
|
||||
2. 打开「个人资料」。
|
||||
预期:服务端字段回填;修改昵称/性别并保存后,我的页昵称同步更新。
|
||||
3. 打开「登录设备」。
|
||||
预期:设备号首尾可见、中间脱敏;平台、机型、时间、状态正确;空列表显示空态。
|
||||
4. 打开「数据导出」。
|
||||
预期:显示资料、凭据、授权记录数、设备数;复制 JSON 成功。
|
||||
5. 打开「注销账号」。
|
||||
预期:显示 15 天冷静期和立即登出提示;提交必须经过二次确认。
|
||||
6. 确认注销。
|
||||
预期:显示 `scheduledAt`,本地 token 清空并回到未登录状态。
|
||||
7. 重新登录后撤销注销。
|
||||
预期:有申请时成功;无申请时显示后端“没有待处理的注销申请”。
|
||||
|
||||
设备侧截图、日志和最终验收结论由用户执行。
|
||||
|
||||
---
|
||||
|
||||
## 2026-10-17 K10 统一空列表占位
|
||||
|
||||
### 26.1 范围、分支与计划
|
||||
|
||||
Reference in new issue
Block a user