落地 synastry/star/ask API 与 H5 页面,补齐 cece-frontend-re complete-design 证据文档,并加入 Android 模拟器截图抓取脚本。 Co-authored-by: Cursor <cursoragent@cursor.com>
145 lines
2.8 KiB
Markdown
145 lines
2.8 KiB
Markdown
# Feature Spec: 成长报告
|
||
|
||
> Status: `Active` · Map: `2.1.2 · 5.2 我的成长报告 [P1]` · Phase: `P1`
|
||
> 规范:[../feature-design.md](../feature-design.md)
|
||
|
||
---
|
||
|
||
## 1. 功能定义
|
||
|
||
| 字段 | 内容 |
|
||
|---|---|
|
||
| Name | 成长报告 |
|
||
| Purpose | 沉淀用户已生成的画像/关系等报告资产,支持回看与深度解锁 |
|
||
| Business Goal | 「我的」资产感;复访与付费 |
|
||
|
||
| In | Out |
|
||
|---|---|
|
||
| 列表 + 详情;按权益展示 detail | 收藏夹完整产品(可后置) |
|
||
| portrait / relation 类型 | 第三方导出 PDF(Gap) |
|
||
|
||
---
|
||
|
||
## 2. 用户价值
|
||
|
||
1. **为何需要:** 不想每次重新生成才能回看。
|
||
2. **完成后获得:** 历史报告列表与详情。
|
||
3. **付费:** 详情内深度版墙同 membership Spec。
|
||
|
||
---
|
||
|
||
## 3. 用户角色
|
||
|
||
| Actor | 能力 |
|
||
|---|---|
|
||
| Visitor | 仅己方报告 |
|
||
| DeepAccess/VIP | 详情 detail |
|
||
|
||
---
|
||
|
||
## 4. 用户流程
|
||
|
||
```text
|
||
/mine → 成长报告列表 /reports
|
||
↓
|
||
点一项 → /reports/:id
|
||
↓
|
||
展示 summary;无权益则 Locked → 支付 → detail
|
||
```
|
||
|
||
---
|
||
|
||
## 5. 页面设计
|
||
|
||
| 路由 | 页面 |
|
||
|---|---|
|
||
| `/reports` | ReportsPage(入口也在 `/mine`) |
|
||
| `/reports/:id` | ReportPage |
|
||
|
||
---
|
||
|
||
## 6. 页面状态规范
|
||
|
||
| 状态 | UI |
|
||
|---|---|
|
||
| Loading | 列表/详情加载 |
|
||
| Empty | 无报告 → 引导画像/探索 |
|
||
| Error | 重试 |
|
||
| Normal | 列表项 / ReportRich |
|
||
| Locked | 深度版 CTA |
|
||
|
||
---
|
||
|
||
## 7. Business Rules
|
||
|
||
| ID | Rule |
|
||
|---|---|
|
||
| R1 | 仅返回当前用户报告 |
|
||
| R2 | summary 可读;detail 按 Membership/DeepAccess |
|
||
| R3 | type 区分 portrait / relation 等渲染 |
|
||
| R4 | 删除报告策略:未要求则可不做;若做须鉴权 |
|
||
|
||
---
|
||
|
||
## 8. 数据模型影响
|
||
|
||
| 表 | 备注 |
|
||
|---|---|
|
||
| `growth_reports` | 主数据 |
|
||
|
||
---
|
||
|
||
## 9. API 需求
|
||
|
||
| Method | Path | 意图 |
|
||
|---|---|---|
|
||
| GET | `/api/v1/reports` | 列表 |
|
||
| GET | `/api/v1/reports/{id}` | 详情(权益剥离) |
|
||
|
||
---
|
||
|
||
## 10. 权限设计
|
||
|
||
| 能力 | 所有者 | 非所有者 |
|
||
|---|---|---|
|
||
| 列表/详情 | ✓ | ✗ |
|
||
| detail 字段 | 视权益 | ✗ |
|
||
|
||
---
|
||
|
||
## 11. 埋点
|
||
|
||
| Event | 触发 |
|
||
|---|---|
|
||
| `reports_list_viewed` | 打开列表 |
|
||
| `report_opened` | 打开详情 |
|
||
| `deep_access_clicked` | 详情内 CTA |
|
||
|
||
---
|
||
|
||
## 12. 测试验收标准
|
||
|
||
**Given** 用户有报告
|
||
**When** GET 列表
|
||
**Then** 仅己方项
|
||
|
||
**Given** 无权益
|
||
**When** 打开详情
|
||
**Then** summary 可见 detail 不可见
|
||
|
||
---
|
||
|
||
## 13. AI 开发前检查
|
||
|
||
- [x] Spec 齐全
|
||
|
||
---
|
||
|
||
## 14. Implementation Notes
|
||
|
||
| 项 | 内容 |
|
||
|---|---|
|
||
| Packages | `handler/report` · `ReportsPage` · `ReportPage` · Mine 入口 |
|
||
| Gaps | 收藏;PDF |
|
||
| Process Review | 2026-08-02 [P1-PROCESS-REVIEW](P1-PROCESS-REVIEW.md) · 设计闭合 · page-tree 已含 `/reports` · 实现 PASS · 测试 PARTIAL |
|