文档
测试

6、根据标签检索文章

GET
http://localhost:88/api/post/tag/%E7%B3%96%E5%B0%BF%E7%97%85?page=1&size=10

接口描述

根据标签搜索相关文章

路径变量

参数名
类型
描述
必填
name
string
标签名
必填

请求参数

参数名
类型
描述
必填
page
int
当前页码
必填
size
int
每页记录数
必填

响应参数

参数名
类型
描述
必填
msg
string
提示信息
必填
code
int
0-成功,其他业务码-失败
必填
data
object
返回的数据信息
必填
topics
object
文章信息
必填
records
array
文章列表
必填
id
string
文章id
必填
title
string
文章标题
必填
content
string
文章内容
必填
userId
string
用户id
必填
comments
int
评论数
必填
collects
int
收藏数
必填
view
int
浏览量
必填
sectionId
int
专栏id
必填
top
int
是否置顶
必填
essence
int
是否加精
必填
createTime
string
创建时间
必填
modifyTime
object
修改时间
必填
total
int
文章总数
必填
size
int
每页记录数
必填
current
int
当前页码
必填
orders
array
排序字段信息
必填
hitCount
boolean
是否命中count缓存
必填
searchCount
boolean
是否进行 count 查询
必填
pages
int
总页数
必填
hotTags
object
热门标签信息
必填
records
array
标签列表
必填
id
string
标签id
必填
name
string
标签名
必填
topicCount
int
关联话题数量
必填
total
int
标签总数
必填
size
int
每页记录数
必填
current
int
当前页码
必填
orders
array
排序字段信息
必填
hitCount
boolean
是否命中count缓存
必填
searchCount
boolean
是否进行 count 查询
必填
pages
int
总页数
必填

响应数据示例

```json { "msg": "success", "code": 0, "data": { "topics": { "records": [ { "id": "1494255011344834561", "title": "关于糖尿病的预防", "content": "预防糖尿病\n\n", "userId": "1491351452034928641", "comments": 0, "collects": 0, "view": 1, "sectionId": 0, "top": 0, //0-否,1-是 "essence": 0, //0-否,1-是 "createTime": "2022-02-17 10:18:51", "modifyTime": null } ], "total": 1, "size": 10, "current": 1, "orders": [], "hitCount": false, "searchCount": true, "pages": 1 }, "hotTags": { "records": [ { "id": "1332650453377708034", "name": "java", "topicCount": 15 }, { "id": "1332682473218744321", "name": "python", "topicCount": 3 }, { "id": "1332913064463794178", "name": "vue", "topicCount": 2 }, { "id": "1333447953697177602", "name": "flask", "topicCount": 2 }, { "id": "1332681213568589825", "name": "css", "topicCount": 1 }, { "id": "1332681213631504385", "name": "mongodb", "topicCount": 1 }, { "id": "1332913064530903041", "name": "react", "topicCount": 1 }, { "id": "1333432347107143681", "name": "node", "topicCount": 1 }, { "id": "1333432347107143682", "name": "mysql", "topicCount": 1 }, { "id": "1333676096320106498", "name": "spring", "topicCount": 1 } ], "total": 21, "size": 10, "current": 1, "orders": [], "hitCount": false, "searchCount": true, "pages": 3 } } }