Files
2026-07-09 14:24:46 +08:00

64 lines
2.0 KiB
Markdown
Raw Permalink 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.
# GET /api/v1/invite/invitees — 我邀请的人列表
> 所属:Invite 组(前缀 `/api/v1/invite` | 鉴权:Bearer | [← 返回 API 索引](../README.md)
分页查询当前用户成功邀请的人列表。邀请页小窗(取前几条)+ 完整列表页(分页加载)共用。
## 入参(query
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| `limit` | int | ❌ | 每页条数(150,默认 20) |
| `offset` | int | ❌ | 偏移量(≥0,默认 0) |
Mock 请求:
```
GET /api/v1/invite/invitees?limit=5&offset=0
```
## 出参
响应 `200`:`InviteeListOut`
| 字段 | 类型 | 说明 |
|---|---|---|
| `items` | list[InviteeItem] | 被邀请人列表 |
| `items[].display_name` | string | 显示名(昵称 → 微信昵称 → 脱敏手机号,后端已兜底) |
| `items[].avatar_url` | string \| null | 头像 URLnull = 前端画默认色块 |
| `items[].coins` | int | 这次邀请给邀请人发的金币(**历史留痕**:#113 前旧口径的发放额;新绑定恒 0) |
| `items[].is_compared` | bool | 该好友是否已完成过一次比价(#113:好友列表据此分「邀请成功 / 去提醒」,在途列表只取 `false` 的) |
| `items[].invited_at` | datetime | 邀请绑定时间(ISO 8601 UTC |
| `total` | int | 我邀请的总人数 |
| `has_more` | bool | 还有下一页吗 |
Mock 出参:
```json
{
"items": [
{
"display_name": "省钱小王",
"avatar_url": "/media/avatars/u2_f1e2d3c4b5a60708.jpg",
"coins": 0,
"is_compared": true,
"invited_at": "2026-06-28T14:30:00Z"
},
{
"display_name": "138****1234",
"avatar_url": null,
"coins": 0,
"is_compared": false,
"invited_at": "2026-07-01T09:15:00Z"
}
],
"total": 5,
"has_more": false
}
```
## 错误码
- `401` 未鉴权 / token 失效
## 说明
- 名字/头像降级兜底在后端算好:昵称 → 微信昵称 → 脱敏手机号
- `limit` 钳到 [1, 50]`offset` 钳到 ≥0