文档
测试

praiseComment

POST
api/v1/praiseComment

接口描述

钓场评论回复点赞/取消点赞

请求参数

参数名
类型
描述
必填
user_id
integer
用户id
必填
token
integer
用户token
必填
comment_id
integer
评论id
必填
code
integer
不需要传 此为结果返回值 0点赞成功 1取消点赞成功 点赞/取消 点击切换
必填

php

$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://sns.shenruxiang.com/api/v1/praiseComment', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'user_id' => 8, 'token' => 16, 'comment_id' => 17, 'code' => 11, ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));

js

const url = new URL( "http://sns.shenruxiang.com/api/v1/praiseComment" ); let headers = { "Content-Type": "application/json", "Accept": "application/json", }; let body = { "user_id": 8, "token": 16, "comment_id": 17, "code": 11 } fetch(url, { method: "POST", headers: headers, body: body }) .then(response => response.json()) .then(json => console.log(json));

返回值

{ "code": 0, "msg": "点赞成功", "data": [] }

bash

curl -X POST \ "http://sns.shenruxiang.com/api/v1/praiseComment" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"user_id":8,"token":16,"comment_id":17,"code":11}'