Files
luo d672dec0d0
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 2m16s
fix: some
2026-10-14 09:12:34 +08:00

78 lines
4.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## ADDED Requirements
### Requirement: Expiry reminders SHALL use the optional asset-info response
H5 SHALL 仅以 `GET /api/c/v1/asset/info` 返回的可选 `expiry_reminder` 作为本次临期主动提醒来源,在首页展示居中、可关闭的临期弹窗,而不是内联横幅。剩余天数、到期时间、等级及等级名称 SHALL 使用 `remaining_days`、`expires_at`、`level`、`level_name`,SHALL NOT 用旧未读临期通知或客户端计算补发提醒。
#### Scenario: Asset info includes a reminder
- **WHEN** 当前资产响应含有效 expiry_reminder
- **THEN** H5 SHALL 展示该资产临期弹窗及后端提供的提醒信息
#### Scenario: Asset info omits the optional field
- **WHEN** 响应无 expiry_reminder,且当前进入没有已接收的待展示提醒
- **THEN** H5 SHALL 不显示临期弹窗,也不从 is_expiring 或通知列表补发
### Requirement: Reminder presentation SHALL preserve server calendar and levels
H5 SHALL 正确显示 0~15 天,按后端 `red`(0~3)、`purple`(4~7)、`pink`(8~15)设置视觉等级,并提供文字信息。到期时间 SHALL 按 Asia/Shanghai 展示,SHALL NOT 按客户端日期重新判定等级或剩余自然日。
#### Scenario: Zero remaining days
- **WHEN** 后端返回 remaining_days=0、level=red
- **THEN** H5 SHALL 正常展示 0 天及红色等级,不能把 0 当作缺失
#### Scenario: Client timezone differs from Shanghai
- **WHEN** 用户设备的本地时区不是 Asia/Shanghai
- **THEN** H5 SHALL 保留后端天数和等级,到期时间使用上海时区呈现
### Requirement: One-time reminder delivery SHALL survive competing asset-info consumers
H5 SHALL 在 asset/info 的共享成功返回入口接收一次性提醒,按当前客户上下文及资产隔离并暂存至对应资产可见。后端负责每日一次,前端 SHALL 防止同次接收被重复展示,SHALL NOT 因并发空字段响应覆盖已接收提醒、使用额外轮询或在关闭后复播。
#### Scenario: Child component receives the only reminder response
- **WHEN** TrafficCard 等调用方先获得 expiry_reminder,首页后续响应未返回该字段
- **THEN** H5 SHALL 通过共享接收状态在当前资产信息区展示该提醒,不将其丢弃
#### Scenario: Same asset is re-entered after dismissal
- **WHEN** 用户关闭提醒后再次进入同一资产,后端不再返回字段
- **THEN** H5 SHALL 不重播先前已展示提醒
#### Scenario: User switches customer or asset
- **WHEN** 用户退出、切换客户或进入另一资产
- **THEN** H5 SHALL 不显示旧上下文提醒;其他资产有新提醒时 SHALL 独立处理
### Requirement: Expiry notifications SHALL remain in the notification center without driving popups
H5 SHALL 从首页旧未读通知弹窗来源排除临期项,同时保留通知中心临期列表、未读数和既有阅读操作。临期弹窗展示或关闭 SHALL NOT 自动标记通知已读,其他通知及候选弹窗链路 SHALL 保持不变。
#### Scenario: Unread expiry notification exists without a new reminder
- **WHEN** 通知列表返回未读临期项,但 asset/info 无本次提醒
- **THEN** H5 SHALL 不以该项触发旧首页临期弹窗
- **AND** 通知中心 SHALL 仍可展示和阅读该项
#### Scenario: User closes an expiry popup
- **WHEN** 用户关闭临期弹窗
- **THEN** H5 SHALL 不猜测 notification_id、不发送自动单条已读或全部已读请求
### Requirement: Home popups SHALL display sequentially without overlapping
H5 SHALL 在风险换货/运营候选结束后展示待处理临期提醒,再继续既有普通通知流程,一次只显示一个弹窗。提醒 SHALL 仅在实际显示时标记本次已展示;导航或其他弹窗占用时 SHALL 保持待展示状态。
#### Scenario: Candidate and expiry reminder are both present
- **WHEN** 候选弹窗尚未结束且已收到 expiry_reminder
- **THEN** H5 SHALL 先展示候选,关闭后再展示临期提醒,不能叠加两个弹窗
#### Scenario: Notification is already open when reminder arrives
- **WHEN** 普通通知弹窗正在显示,随后收到 expiry_reminder
- **THEN** H5 SHALL 暂存临期提醒,等通知关闭后再展示