文档
测试

userGroundBuy

POST
POST api/v1/userGroundBuy

接口描述

钓场订单商家回购

请求参数

参数名
类型
描述
必填
user_id
integer
用户id
必填
token
integer
用户token
必填
order_id
integer
订单id
必填
fish_list
string
鱼种 重量 价格 json数组([{"name": "鲤鱼","weight": 100,"price": 15},{"name": "鲫鱼","weight": 80,"price": 20}])
必填

php

$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://sns.shenruxiang.com/api/v1/userGroundBuy', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'user_id' => 4, 'token' => 4, 'order_id' => 15, 'fish_list' => 'sit', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));

js

const url = new URL( "http://sns.shenruxiang.com/api/v1/userGroundBuy" ); let headers = { "Content-Type": "application/json", "Accept": "application/json", }; let body = { "user_id": 4, "token": 4, "order_id": 15, "fish_list": "sit" } 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/userGroundBuy" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"user_id":4,"token":4,"order_id":15,"fish_list":"sit"}'