文档
测试

根据用户id获取评论列表

GET
/api/comment/personal/:id

接口描述

根据用户ID获取评论列表,:id为用户ID

响应参数

参数名
类型
描述
必填
code
int
状态码
必填
msg
string
响应描述
必填
data
object
返回数据
必填

说明 / 示例

{ "code": 200, "msg": "获取评论成功", "data": [ { "createdAt": "2022/10/26 20:39:35", "_id": "63562d2e8b20bb13254e96f2", "content": "就这就这?", "topicId": { "collected": 0, "_id": "63519b4f4187ee9cf6de0279", "user": "634e49dd93c820e7944daf8a", "title": "231123123", "content": "<p>12312331231231</p>", "text": "12312331231231", "images": [], "videos": [], "createdAt": "2022/10/21 03:02:37", "read": 0, "comments": 0, "praise": 0 }, "voteCount": 0 }, { "createdAt": "2022/10/26 20:39:35", "_id": "63562d378b20bb13254e96f4", "content": "就这就这213123?", "topicId": { "collected": 0, "_id": "63519b4f4187ee9cf6de0279", "user": "634e49dd93c820e7944daf8a", "title": "231123123", "content": "<p>12312331231231</p>", "text": "12312331231231", "images": [], "videos": [], "createdAt": "2022/10/21 03:02:37", "read": 0, "comments": 0, "praise": 0 }, "voteCount": 0 }, { "createdAt": "2022/10/26 20:39:35", "_id": "63563ae9808ff7dd8c04c5be", "content": "dwadaw", "topicId": { "read": 0, "praise": 0, "collected": 0, "_id": "634ec57d4522d690a765f239", "title": "123", "content": "<p><br></p>", "images": [], "videos": [], "createdAt": "2022/10/18 23:16:06", "comments": 8 }, "voteCount": 0 }, { "createdAt": "2022/10/26 20:39:35", "_id": "63568eae0d632d72cf3361bd", "content": "我的评价是一般", "topicId": { "read": 0, "praise": 0, "collected": 0, "_id": "634ec57d4522d690a765f239", "title": "123", "content": "<p><br></p>", "images": [], "videos": [], "createdAt": "2022/10/18 23:16:06", "comments": 8 }, "voteCount": 0 }, { "_id": "6358cef272d4b1eccbd7001a", "content": "you can youup,no can no bb4", "topicId": { "collected": 0, "_id": "63519bb879ddb38c8d7b75e1", "user": "634e49dd93c820e7944daf8a", "title": "231123123", "content": "<p>12312331231231<img src=\"http://localhost:8007/uploads/634e49dd93c820e7944daf8a/topicImg-1666292662262.png\" alt=\"topicImg-1666292662262.png\" data-href=\"\" style=\"\"/></p>", "text": "12312331231231", "images": [ "63519bb679ddb38c8d7b75dd" ], "videos": [], "createdAt": "2022/10/21 03:04:09", "read": 0, "comments": 3, "praise": 0 }, "voteCount": 0, "replyTo": "63557e1717c7bb04b92b0a25", "createdAt": "2022/10/26 14:08:49" }, { "_id": "6358cf1472d4b1eccbd7001e", "content": "you can youup,no can no bb5", "topicId": { "collected": 0, "_id": "63519bb879ddb38c8d7b75e1", "user": "634e49dd93c820e7944daf8a", "title": "231123123", "content": "<p>12312331231231<img src=\"http://localhost:8007/uploads/634e49dd93c820e7944daf8a/topicImg-1666292662262.png\" alt=\"topicImg-1666292662262.png\" data-href=\"\" style=\"\"/></p>", "text": "12312331231231", "images": [ "63519bb679ddb38c8d7b75dd" ], "videos": [], "createdAt": "2022/10/21 03:04:09", "read": 0, "comments": 3, "praise": 0 }, "voteCount": 0, "createdAt": "2022/10/26 14:08:49" }, { "_id": "6358cf4572d4b1eccbd70022", "content": "you can youup,no can no bb5", "topicId": { "collected": 0, "_id": "63519bb879ddb38c8d7b75e1", "user": "634e49dd93c820e7944daf8a", "title": "231123123", "content": "<p>12312331231231<img src=\"http://localhost:8007/uploads/634e49dd93c820e7944daf8a/topicImg-1666292662262.png\" alt=\"topicImg-1666292662262.png\" data-href=\"\" style=\"\"/></p>", "text": "12312331231231", "images": [ "63519bb679ddb38c8d7b75dd" ], "videos": [], "createdAt": "2022/10/21 03:04:09", "read": 0, "comments": 3, "praise": 0 }, "voteCount": 0, "rootCommentId": "63568eae0d632d72cf3361bd", "replyTo": "63557e1717c7bb04b92b0a25", "createdAt": "2022/10/26 14:08:49" } ] }

响应失败参数

参数名
类型
描述
必填
code
int
状态码400或404
必填
msg
string
响应描述
必填
data
object
用户信息
必填

响应失败描述

<pre> { "code": 400, "msg": "获取评论失败" }