文档
测试

groundDetailComment

POST
api/v1/groundDetailComment

接口描述

钓场详情-评论列表

请求参数

参数名
类型
描述
必填
ground_id
integer
钓场id
必填

php

$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://sns.shenruxiang.com/api/v1/groundDetailComment', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'ground_id' => 7, ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));

js

const url = new URL( "http://sns.shenruxiang.com/api/v1/groundDetailComment" ); let headers = { "Content-Type": "application/json", "Accept": "application/json", }; let body = { "ground_id": 7 } fetch(url, { method: "POST", headers: headers, body: body }) .then(response => response.json()) .then(json => console.log(json));

返回值

{ "code": 0, "msg": "请求成功", "data": { "comment_num": "5【总评论数】", "comment_list": [ { "id": "1【评论id】", "created_at": "2020-09-19,17:08【评论时间】", "praise_num": "点赞数", "is_praise": "1【0未赞 1已赞】", "content": "评论内容", "comment_num": "2【某条评论下评论数】", "nick": "用户昵称", "avatar": "https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/MGHEh8F2XiaDXWB1aXHY05wYMzbZ9EiaHcDoibdoczOct6CfvjFFykwCuKrsnQUba5qHAibAwY6BGNaP0BG9ltX0hQ\/132【头像】" }, { "created_at": "2020-09-19,17:08【评论时间】", "praise_num": "点赞数", "is_praise": "1【0未赞 1已赞】", "content": "评论内容", "comment_num": "2【某条评论下评论数】", "nick": "用户昵称", "avatar": "https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/MGHEh8F2XiaDXWB1aXHY05wYMzbZ9EiaHcDoibdoczOct6CfvjFFykwCuKrsnQUba5qHAibAwY6BGNaP0BG9ltX0hQ\/132【头像】" } ] } }

bash

curl -X POST \ "http://sns.shenruxiang.com/api/v1/groundDetailComment" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"ground_id":7}'