Files
shaguabijia-app-server/docs/api/invite/invite-invitees.md
T
guke a563c1ca4b @ (#111)
docs/api目录文档分类和补全

---------

Co-authored-by: guke <guke@autohome.com.cn>
Reviewed-on: #111
2026-07-03 15:00:37 +08:00

61 lines
1.7 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.
# 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 | 这次邀请给邀请人发的金币 |
| `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": 10000,
"invited_at": "2026-06-28T14:30:00Z"
},
{
"display_name": "138****1234",
"avatar_url": null,
"coins": 10000,
"invited_at": "2026-07-01T09:15:00Z"
}
],
"total": 5,
"has_more": false
}
```
## 错误码
- `401` 未鉴权 / token 失效
## 说明
- 名字/头像降级兜底在后端算好:昵称 → 微信昵称 → 脱敏手机号
- `limit` 钳到 [1, 50]`offset` 钳到 ≥0