{域名地址}/api/comment/list
说明:{域名地址} 需要替换成你的域名地址,如 /api/comment/list
GET
| 字段名 |
类型 |
必填 |
说明 |
| id |
int |
否 |
文档ID,指定的文档ID |
| order |
string |
否 |
评论排序,默认 id desc |
| page |
int |
否 |
获取指定分页内容,默认:1 |
| limit |
int |
否 |
显示数量,limit 可以指定显示数量,按多少数量来分页,比如limit="10"则只会显示10条,limit 在不是分页列表的时候,支持offset模式,也就是 ,分隔模式,如想从第2条开始,获取10条数据,可以设置成 limit="2,10"。 |
| 字段名 |
类型 |
说明 |
| code |
int |
错误码 |
| msg |
string |
错误原因说明 |
| data |
object[] |
结果内容 |
| 字段名 |
类型 |
说明 |
| id |
int |
评论ID |
| parent_id |
int |
评论的上级ID |
| archive_id |
int |
文档ID |
| user_name |
string |
评论用户名 |
| user_id |
int |
评论用户ID |
| ip |
string |
评论者IP |
| vote_count |
int |
点赞数量 |
| content |
string |
分类内容详情 |
| created_time |
int |
发布时间戳 |
| updated_time |
int |
更新时间戳 |
| status |
int |
审核状态,1已审核,0审核中 |
| 参数 |
值 |
| moduleId |
1 |
| parentId |
0 |
{
"code": 0,
"data": [
{
"id": 1,
"created_time": 1624494644,
"updated_time": 1626076192,
"archive_id": 71,
"user_id": 0,
"user_name": "crown",
"ip": "127.0.0.1",
"vote_count": 0,
"content": "欢迎使用AnqiCMS",
"parent_id": 0,
"to_uid": 0,
"status": 1,
"item_title": "",
"parent": null,
"active": false
},
{
"id": 2,
"created_time": 1624070973,
"updated_time": 1635423845,
"archive_id": 71,
"user_id": 0,
"user_name": "Memory",
"ip": "127.0.0.1",
"vote_count": 225,
"content": "博客系统很棒",
"parent_id": 1,
"to_uid": 0,
"status": 1,
"item_title": "",
"parent": null,
"active": false
},
],
"msg": "",
"total": 4
}
| 错误码 |
说明 |
| 0 |
OK |
| -1 |
错误,错误原因在msg中指出 |
| 1001 |
未登录 |
| 1002 |
未授权 |
| 200 |
API请求OK |