docs: update creator contents api contract

This commit is contained in:
qingfeng 2026-04-15 18:52:47 +08:00
parent c41c31716e
commit 0ec41b29e5

View File

@ -159,21 +159,49 @@
| page | number | 否 | 页码,默认 1 |
| pageSize | number | 否 | 每页条数,默认 20 |
**响应数据:** 列表项结构与 CONTENT-02 一致,前端渲染锁定态需至少使用以下字段
**响应数据:** 列表项为创作者主页增强版内容卡片结构,兼容保留原瀑布流字段,并补充详情页渲染所需的正文 / 多图 / 视频 / 交互状态字段,前端可直接用于创作者主页卡片渲染
| 字段 | 类型 | 说明 |
|------|------|------|
| list[].contentId | string | 内容 ID |
| list[].title | string | 标题 |
| list[].content | string | 正文内容;锁定态也返回原文,由前端决定摘要/「订阅查看全文」展示方式 |
| list[].coverUrl | url | 封面图 |
| list[].blurCoverUrl | url | 模糊封面(锁定态展示) |
| list[].coverWidth | number | 封面宽度 |
| list[].coverHeight | number | 封面高度 |
| list[].type | string | post/video |
| list[].videoUrl | url | 视频播放签名URL。type 为 video 且 `isLocked=false` 时返回 |
| list[].images | array | 图片列表;结构与 CONTENT-03 `images[]` 一致 |
| list[].images[].mediaId | string | 媒体 ID |
| list[].images[].url | url | 已解锁时返回原图 URL |
| list[].images[].blurUrl | url | 未解锁时返回模糊图 / 缩略图 URL |
| list[].images[].thumbnailUrl | url | 缩略图 URL |
| list[].images[].width | number | 图片宽度 |
| list[].images[].height | number | 图片高度 |
| list[].images[].isLocked | boolean | 单张图片是否锁定 |
| list[].videos | array | 视频列表;结构与 CONTENT-03 `videos[]` 一致 |
| list[].videos[].mediaId | string | 媒体 ID |
| list[].videos[].url | url | 已解锁时返回视频播放签名 URL |
| list[].videos[].coverUrl | url | 视频封面 / 预览图 URL |
| list[].videos[].blurPreviewUrl | url | 未解锁时返回视频模糊预览字段 |
| list[].videos[].width | number | 视频宽度 |
| list[].videos[].height | number | 视频高度 |
| list[].videos[].duration | number | 视频时长(秒) |
| list[].videos[].isLocked | boolean | 单条视频是否锁定 |
| list[].visibility | string | 可见性档位 keyfree/junior/basic/senior/supreme |
| list[].visibilityTierName | string/null | 该档位在当前创作者下的展示名 |
| list[].visibilityTierPrice | number | 该档位价格(代币) |
| list[].creator | object | 创作者信息 `{userId,username,nickname,avatar,isOnline,isFollowing}` |
| list[].isUnlocked | boolean | 当前用户是否已解锁该内容 |
| list[].isLiked | boolean | 当前用户是否已点赞 |
| list[].isFavorited | boolean | 当前用户是否已收藏 |
| list[].isLocked | boolean | 是否需要订阅才能查看锁定态展示「订阅查看全文」CTA |
| list[].favoriteCount | number | 收藏数 |
| list[].likeCount | number | 点赞数 |
| list[].commentCount | number | 评论数 |
| list[].viewCount | number | 浏览量 |
| list[].tags | string[] | 标签列表 |
| list[].createdAt | timestamp | 发布时间 |
| pagination | object | 分页信息 |