文档
测试

groundCommentList

POST
api/v1/groundCommentList

接口描述

钓场评论列表

请求参数

参数名
类型
描述
必填
ground_id
integer
钓场id
必填
page
integer
当前页数
必填
limit
integer
每页数据 默认传20 详情评论传2
必填

php

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

js

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

返回值

{ "code": 0, "msg": "请求成功", "data": { "current_page": 1, "data": [ { "id": 1, "user_id": 1, "to_user_id": 22, "comment_id": 0, "content": "评论", "praise_num": 11, "created_at": "2020-09-22 20:30:03", "user": { "id": 1, "nick": "秃头已治愈", "avatar": "https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/Q0j4TwGTfTI85ibhJ698WXV4RewMDxcZD8y7cBItBTk4ZfSsY4icPPwYibnrWYoonE5EcpoXy8BYSvmA3xF1pTyQg\/132" }, "comment_priase": { "comment_id": 1, "user_id": 88, "created_at": "2020-09-22 20:30:55" } } ], "first_page_url": "https:\/\/fish.shenruxiang.com\/api\/v1\/groundCommentList?page=1", "from": 1, "next_page_url": null, "path": "https:\/\/fish.shenruxiang.com\/api\/v1\/groundCommentList", "per_page": "2", "prev_page_url": null, "to": 1 } }

bash

curl -X POST \ "http://sns.shenruxiang.com/api/v1/groundCommentList" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"ground_id":6,"page":17,"limit":6}'