Skip to content
关注公众号,获取新课通知

评论帖子


接口URL

http://demonuxtapi.dishait.cn/pc/post/reply

请求方式

POST

Content-Type

json

请求Header参数

参数名示例值参数类型是否必填参数描述
appidbd9d01ecc75dbbaaefceString网校唯一appid
tokeneyj...NjString认证令牌

请求Body参数

json5
{
    "post_id":1,
    "content":"哈哈哈",
    "reply_id":3,
    "reply_user":{
        "id":252,
        "username":"ceshi22",
        "avatar":""
    }
}
参数名示例值参数类型是否必填参数描述
post_id1Integer帖子ID
content哈哈哈String评论内容
reply_id3Integer被回复评论id,等于0时为一级评论
reply_user-Object被回复用户,当reply_id大于0时必填,json格式
reply_user.id252Integer被回复用户id
reply_user.usernameceshi22String被回复用户名
reply_user.avatar-String被回复用户头像

成功响应示例

json5
{
	"msg": "ok",
	"data": {
		"id": 7,
		"school_id": 11,
		"post_id": 1,
		"reply_id": 3,
		"content": "哈哈哈",
		"user_id": 252,
		"reply_user": {
			"id": 252,
			"username": "ceshi22",
			"avatar": ""
		},
		"user": {
			"id": 1,
			"name": "ceshi1",
			"avatar": ""
		},
		"is_top": 0,
		"updated_time": "2021-05-26T17:38:59.036Z",
		"created_time": "2021-05-26T17:38:59.036Z",
		"userId": 252
	},
	"code": 20000
}

错误响应示例

json5
{
	"msg": "fail",
	"data": "帖子ID不存在"
}