1.优化拉取公告列表接口/api/notice/noticeList
2.移除强弹窗确认已读接口/api/notice/noticeConfirm
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
- **请求方法**:所有移动端业务接口(`/api/*`,不含 `/api/v1/authToken`)一律使用 `POST` 调用;查询类接口同时兼容 `GET`(便于浏览器/调试工具直接访问),客户端统一走 `POST`
|
||||
- `POST` 时请求头 `Content-Type: application/json`,参数放在 JSON body
|
||||
- `GET` 兼容模式下,参数走 URL query string
|
||||
- **例外**:公告模块 `/api/notice/noticeList`、`/api/notice/noticeDetail`、`/api/notice/noticeConfirm` **仅支持 `GET`**,参数一律走 URL query string
|
||||
- **例外**:公告模块 `/api/notice/noticeList`、`/api/notice/noticeConfirm` **仅支持 `GET`**,参数一律走 URL query string
|
||||
- 鉴权类接口 `/api/v1/authToken` 仍为 `GET`
|
||||
- 时间:UTC 时间戳(秒) + 服务端时区配置
|
||||
- 金额:数字传输(如 `"100.00"`),客户端展示统一保留两位小数(存储仍为 `decimal(18,2)`)
|
||||
@@ -723,30 +723,25 @@
|
||||
- `list`:array<object>
|
||||
- `notice_id`:int(含义:公告 ID)
|
||||
- `title`:string(含义:公告标题)
|
||||
- `content`:string(含义:公告正文,原详情接口字段)
|
||||
- `notice_type`:string(`silent`/`popout`,含义:公告类型)
|
||||
- `is_read`:bool(含义:当前用户是否已读)
|
||||
- `must_confirm`:bool(含义:是否必须手动确认;强弹窗为 `true`)
|
||||
- `is_read`:bool(含义:当前用户是否已确认;**仅 `popout` 强弹窗有效**,`silent` 恒为 `false`,不写入阅读记录)
|
||||
- `publish_time`:int(含义:发布时间)
|
||||
|
||||
### 6.2 公告详情
|
||||
- **GET** `/api/notice/noticeDetail`
|
||||
> **阅读记录口径**:`user_notice_read` 仅用于强弹窗(`notice_type=popout`)的确认已读;静默信箱(`silent`)不生成、不查询阅读记录。
|
||||
|
||||
请求参数(query string):
|
||||
- `id`:int,必填(含义:公告 ID)
|
||||
|
||||
返回参数:
|
||||
- `notice_id`:int(含义:公告 ID)
|
||||
- `title`:string(含义:公告标题)
|
||||
- `content`:string(含义:公告正文)
|
||||
- `notice_type`:string(含义:公告类型)
|
||||
- `must_confirm`:bool(含义:是否必须手动确认)
|
||||
- `publish_time`:int(含义:发布时间)
|
||||
|
||||
### 6.3 强弹窗确认已读
|
||||
### 6.2 强弹窗确认已读
|
||||
- **GET** `/api/notice/noticeConfirm`
|
||||
|
||||
请求参数(query string):
|
||||
- `notice_id`:int(含义:待确认公告 ID)
|
||||
|
||||
行为说明:
|
||||
- **仅强弹窗**(`notice_type=popout`)可调用;静默公告调用返回业务错误
|
||||
- 若当前用户对该公告已有阅读记录:仅更新 `read_at`;若尚未确认则同时将 `confirmed` 置为 `1`
|
||||
- 若无阅读记录:创建一条已确认记录
|
||||
|
||||
返回参数:
|
||||
- `notice_id`:int(含义:已确认公告 ID)
|
||||
- `confirmed`:bool(含义:确认结果)
|
||||
@@ -880,8 +875,8 @@
|
||||
|
||||
## 8.3 公告强触达流程
|
||||
1. 客户端监听 `notice.popout`
|
||||
2. 拉取详情 `GET /api/notice/noticeDetail`
|
||||
3. 用户勾选确认 `GET /api/notice/noticeConfirm?notice_id=...`
|
||||
2. 拉取列表 `GET /api/notice/noticeList`(列表项已含 `content`、`must_confirm`)
|
||||
3. 用户勾选确认 `GET /api/notice/noticeConfirm?notice_id=...`(若已有阅读记录则仅更新 `read_at`)
|
||||
4. 未确认前可由前端阻断下注入口
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user