接口概述
评论接口包含 : 评论列表读取、点赞、回复等功能,详情下面的接口说明
获取评论列表
请求地址 : comments/items/评论索引/page_页码
请求方式 : GET
返回数据 : JSON 形式{
status : true | empty
data : [
{
comments_content: (评论内容)
comments_date: (评论时间)
comments_id: (评论id)
comments_index: (评论索引)
comments_ip: (ip地址)
comments_like_count: (点赞数)
comments_reply_count: (回复数)
comments_reply_id: (回复id)
comments_reply_list: (回复列表)
comments_reply_showid: (回复展示id)
comments_reply_uid: (回复uid)
comments_reply_uname: (回复昵称)
comments_uid: (评论id)
comments_url: (评论 weburl)
u_face: (评论头像)
u_id: (评论用户uid)
u_nickname: (评论用户昵称)
}
]
}
获取用户点赞数据 ( 对应某个具体索引 )
请求地址 : comments/getLikes//评论索引
请求方式 : GET
返回数据 : JSON 形式 {
status : true | empty
data : -评论id-评论id---
}
评论提交接口
请求地址 : comments/send
请求方式 : GET
返回数据 : JSON 形式 {
status : true | false
data : 错误信息( 如果失败 )
}
$_POST 数据格式
$_POST['comments_index'] 评论索引 * 必填
$_POST['comments_reply_id'] 回复评论 ID
$_POST['comments_reply_showid'] 回复评论展示 ID
$_POST['comments_reply_uid'] 回复用户 UID
$_POST['comments_reply_uname'] 回复用户昵称
$_POST['comments_url'] 文章地址
$_POST['comments_content'] 评论内容 * 必填