文档
测试

获取评论列表

GET
api/comment

请求头

参数名
类型
描述
必填
Authorization
string
Bear +token(不要忽略Bear后的空格)
必填

请求参数

参数名
类型
描述
必填
aid
number
文章id
必填
index
number
页码,默认为1
可选

成功

参数名
类型
描述
必填
status
number
示例:0
必填
message
string
示例:OK
必填
data
object
数据字典
必填
records
array
数据列表
必填
id
number
示例:17
必填
commenterName
string
示例:LiuZhen
必填
nickname
string
示例:带帅比
必填
content
string
示例:牛的
必填
commentTime
string
示例:2020-04-09T14:35:02
必填
aid
number
示例:1
必填
avatarUrl
object
示例:null
必填
reply
array
数据列表
必填
total
number
示例:4
必填
size
number
示例:20
必填
current
number
示例:1
必填
orders
array
数据列表
必填
hitCount
boolean
示例:false
必填
searchCount
boolean
示例:true
必填
pages
number
示例:1
必填

成功示例

~~~json { "status": 0, "message": "OK", "data": { "records": [ { "id": 17, "commenterName": "LiuZhen", "nickname": "带帅比", "content": "牛的", "commentTime": "2020-04-09T14:35:02", "aid": 1, "avatarUrl": null, "reply": [] }, { "id": 16, "commenterName": "LiuZhen", "nickname": "带帅比", "content": "2333333", "commentTime": "2020-04-09T14:34:57", "aid": 1, "avatarUrl": null, "reply": [ { "id": 5, "commenterName": "LiuZhen", "nickname": "带帅比", "content": "牛的", "commentTime": "2020-04-09T14:38:06", "targetUsername": "LiuZhen", "targetNickname": "带帅比", "commentId": 16, "pid": 16, "avatarUrl": null, "targetAvatarUrl": null } ] }, { "id": 15, "commenterName": "LiuZhen", "nickname": "带帅比", "content": "太强了", "commentTime": "2020-04-09T14:34:54", "aid": 1, "avatarUrl": null, "reply": [] }, { "id": 1, "commenterName": "LiuZhen", "nickname": "带帅比", "content": "6666666666666666", "commentTime": "2020-04-09T02:09:01", "aid": 1, "avatarUrl": null, "reply": [ { "id": 2, "commenterName": "LiuZhen", "nickname": "带帅比", "content": "楼中楼牛批", "commentTime": "2020-04-05T02:25:19", "targetUsername": "LiuZhen", "targetNickname": "带帅比", "commentId": 1, "pid": 1, "avatarUrl": null, "targetAvatarUrl": null }, { "id": 3, "commenterName": "LiuZhen", "nickname": "带帅比", "content": "楼中楼牛批1", "commentTime": "2020-04-07T02:25:19", "targetUsername": "LiuZhen", "targetNickname": "带帅比", "commentId": 1, "pid": 1, "avatarUrl": null, "targetAvatarUrl": null } ] } ], "total": 4, "size": 20, "current": 1, "orders": [], "hitCount": false, "searchCount": true, "pages": 1 } }

失败

参数名
类型
描述
必填
失败情况 一
必填
status
number
示例:2
必填
message
string
示例:不存在这封信!
必填
data
object
示例:null
必填
失败情况三
500 跟其他一样,小概率服务器出错
必填