文档
测试

话题评论 -增加

POST
http://127.0.0.1:8888/community/comment

请求参数

参数名
类型
描述
必填
user_id
int
用户id
必填
content_id
int
话题id
必填
comment_type
int
当是添加话题评论时为1, 添加评论的评论时为 0
必填
comment
object
看下边说明
必填
content_id
int
示例:2
必填
comment_content
string
示例:这是评论内容2
必填
love_count
int
示例:1000
必填

响应参数

参数名
类型
描述
必填
data
object
示例:null
必填
list
object
示例:null
必填
msg
string
示例:操作成功
必填
status
int
示例:1
必填

说明 / 示例

### 请求参数内容示例: 1. 当为话题评论: > { "user_id":2, "content_id":2, "comment_type": 1, "comment": { "content_id": 2, "comment_content": "这是评论内容2", "love_count": 1000 } } 2. 当为评论的评论时: > { "user_id":2, "comment_id":10, "comment_type": 0, "comment": { "comment_content": "这是评论1的评论内容", "love_count": 1000 } } ### 响应说明 1. 用户不存在: status=0, msg='用户不存在' 2. comment_type参数不符合规范: status=0, msg='参数有误' 3. 话题不存在: status=0, msg='话题不存在' 4. 响应成功: status=1, msg='操作成功'