Files
device-voice-h5/docs/产品迭代7月份/个人客户站内通知.md
luo 9c1c296d2e
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m29s
feat: 站内通知
2026-07-25 11:08:03 +08:00

46 lines
1.5 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.
# 个人客户站内通知
为个人客户增加通知入口,支持查询通知、查看未读数以及标记已读。所有接口均需要登录,使用 `Bearer Token` 鉴权。
## 查询通知列表
`GET /api/c/v1/notifications`
查询当前客户可见的未过期业务通知,按创建时间和通知 ID 倒序排列。
| 参数 | 必填 | 说明 |
| --- | --- | --- |
| `page` | 否 | 页码,默认 1范围 110000 |
| `page_size` | 否 | 每页数量,默认 20范围 150 |
返回:包含通知列表 `items`、当前页 `page`、每页数量 `size` 和总数 `total`。通知项包含标题、正文、类型、类别、级别、关联资源、已读状态及创建/已读时间。
## 标记单条通知已读
`PUT /api/c/v1/notifications/{id}/read`
将当前客户可见的指定通知标记为已读。通知不存在、属于其他客户或已经已读时,也返回成功,接口幂等。
返回:`{ "success": true }`
## 全部标记已读
`PUT /api/c/v1/notifications/read-all`
将当前客户可见的未过期未读业务通知全部标记为已读,重复调用幂等。
返回:`{ "updated_count": 3 }`
## 查询未读数
`GET /api/c/v1/notifications/unread-count`
查询当前客户未过期业务通知的未读数量;平台同步和系统运维通知不计入结果。
返回:`{ "count": 3, "display_count": "3" }`,数量超过 99 时 `display_count``99+`
## 通用约定
- 所有接口均使用 `Bearer Token` 鉴权。
- 未登录、参数错误、无权访问和服务异常沿用统一错误响应。