模块:内容模块(文章/视频) 接口数:21 更新:2026-09-05 16:11

内容模块(文章/视频)

控制层 TypechoContentsController @author buxia97 @date 2021/11/29

类路径ContentsController 前缀/typechoContents

1. contentsInfo

接口路径GET/POST /typechoContents/contentsInfo

权限:公开接口,不校验 token

接口说明:查询文章详情

请求参数

参数名 类型 必填 默认值 说明
key String -
isMd Integer 0
token String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


2. contentsList

接口路径GET/POST /typechoContents/contentsList

权限:公开接口;但当系统配置 isLogin=1 时会强制要求登录

接口说明:表单查询请求 @param searchParams Bean对象JSON字符串 @param page 页码 @param limit 每页显示数量

请求参数

参数名 类型 必填 默认值 说明
searchParams String(JSON 字符串,需后端解析) - JSON 字符串,需后端解析
page Integer 1
limit Integer 15
searchKey String -
order String -
random Integer 0
token String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


3. contentsAdd

接口路径GET/POST /typechoContents/contentsAdd

权限:需要登录(普通用户及以上)

接口说明:发布文章 @param params Bean对象JSON字符串

请求参数

参数名 类型 必填 默认值 说明
params String(JSON 字符串,需后端解析) - JSON 字符串,需后端解析
token String -
text String -
isMd Integer 1
isSpace Integer 0
isDraft Integer 0
isPaid Integer 0
shopPice String 0.00
shopText String -
shopDiscount String 1.0
unlockMode Integer 0
adNum Integer 1
verifyCode String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


4. contentsUpdate

接口路径GET/POST /typechoContents/contentsUpdate

权限:需要登录(普通用户及以上)

接口说明:文章修改 @param params Bean对象JSON字符串

请求参数

参数名 类型 必填 默认值 说明
params String(JSON 字符串,需后端解析) - JSON 字符串,需后端解析
token String -
text String -
isDraft Integer 0
isMd Integer 1
isPaid Integer 0
shopPice String 0.00
shopText String -
shopDiscount String 1.0
unlockMode Integer 0
adNum Integer 1

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


5. formDelete

接口路径GET/POST /typechoContents/contentsDelete

权限:需要登录(普通用户及以上)

接口说明:文章删除

请求参数

参数名 类型 必填 默认值 说明
key String -
token String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


6. contentsAudit

接口路径GET/POST /typechoContents/contentsAudit

权限:需要登录(普通用户及以上)

接口说明:文章审核

请求参数

参数名 类型 必填 默认值 说明
key String -
token String -
type Integer 0
reason String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


7. setFields

接口路径GET/POST /typechoContents/setFields

权限:需要登录(普通用户及以上)

接口说明:文章自定义字段设置

请求参数

参数名 类型 必填 默认值 说明
cid Integer -
name String -
strvalue String -
token String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


8. addRecommend

接口路径GET/POST /typechoContents/toRecommend

权限:需要管理员或编辑权限

接口说明:文章推荐&加精

请求参数

参数名 类型 必填 默认值 说明
key String -
recommend Integer -
token String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


9. addTop

接口路径GET/POST /typechoContents/addTop

权限:需要管理员或编辑权限

接口说明:文章置顶

请求参数

参数名 类型 必填 默认值 说明
key String -
istop Integer -
token String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


10. addSwiper

接口路径GET/POST /typechoContents/addSwiper

权限:需要管理员或编辑权限

接口说明:文章轮播(兼容旧版APP,后续新版不通过此渠道)

请求参数

参数名 类型 必填 默认值 说明
key String -
isswiper Integer -
token String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


11. isCommnet

接口路径GET/POST /typechoContents/isCommnet

权限:需要登录(普通用户及以上)

接口说明:文章是否评论过(用于回复可见)

请求参数

参数名 类型 必填 默认值 说明
key String -
token String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


12. ImagePexels

接口路径GET/POST /typechoContents/ImagePexels

权限:公开接口;但当系统配置 isLogin=1 时会强制要求登录

接口说明:pexels图库

请求参数

参数名 类型 必填 默认值 说明
page Integer 1
searchKey String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


13. rewardList

接口路径GET/POST /typechoContents/rewardList

权限:公开接口;但当系统配置 isLogin=1 时会强制要求登录

接口说明:文章打赏者列表

请求参数

参数名 类型 必填 默认值 说明
page Integer 1
limit Integer 15
id Integer -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


14. foreverblog

接口路径GET/POST /typechoContents/foreverblog

权限:公开接口;但当系统配置 isLogin=1 时会强制要求登录

接口说明:十年之约 https://www.foreverblog.cn/

请求参数

参数名 类型 必填 默认值 说明
page String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


15. contentConfig

接口路径GET/POST /typechoContents/contentConfig

权限:公开接口;但当系统配置 isLogin=1 时会强制要求登录

接口说明:注册系统配置信息

请求参数

无请求参数

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


16. allData

接口路径GET/POST /typechoContents/allData

权限:需要管理员或编辑权限

接口说明:全站统计

请求参数

参数名 类型 必填 默认值 说明
token String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


17. followSpace

接口路径GET/POST /typechoContents/followContents

权限:需要登录(普通用户及以上)

接口说明:我关注的人的文章

请求参数

参数名 类型 必填 默认值 说明
token String -
page Integer 1
limit Integer 15

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


18. getDocx

接口路径GET/POST /typechoContents/getDocx

权限:需要超级管理员权限

接口说明:我关注的人的文章

请求参数

参数名 类型 必填 默认值 说明
token String -
cid String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


19. userTextBlockStatus

接口路径GET/POST /typechoContents/userTextBlockStatus

权限:需要登录(普通用户及以上)

接口说明:用户自己检测文章是否违规

请求参数

参数名 类型 必填 默认值 说明
text String -
token String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

20. videoFeed

接口路径GET/POST /typechoContents/videoFeed

权限:公开接口;但当系统配置 isLogin=1 时会强制要求登录

接口说明:视频推送接口,类似抖音

请求参数

参数名 类型 必填 默认值 说明
lastTime Long -
cid Integer -
direction String down
limit Integer 10
token String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}

前端调用参考


21. videoList

接口路径GET/POST /typechoContents/videoList

权限:公开接口;但当系统配置 isLogin=1 时会强制要求登录

接口说明:视频分页接口

请求参数

参数名 类型 必填 默认值 说明
page Integer 1
limit Integer 10
token String -

响应说明

{
  "code": 1,
  "msg": "",
  "data": ...
}