文档
测试

groundPondSeatSelect

POST
api/v1/groundPondSeatSelect

接口描述

用户挑选鱼塘座位(当选座方式为自主选钓号调用此接口 随机派发直接下单不选座)

请求参数

参数名
类型
描述
必填
user_id
integer
用户id
必填
token
integer
用户token
必填
pond_id
integer
鱼塘id
必填

php

$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://sns.shenruxiang.com/api/v1/groundPondSeatSelect', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'user_id' => 5, 'token' => 3, 'pond_id' => 6, ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));

js

const url = new URL( "http://sns.shenruxiang.com/api/v1/groundPondSeatSelect" ); let headers = { "Content-Type": "application/json", "Accept": "application/json", }; let body = { "user_id": 5, "token": 3, "pond_id": 6 } fetch(url, { method: "POST", headers: headers, body: body }) .then(response => response.json()) .then(json => console.log(json));

返回值

{ "code": 0, "msg": "请求成功", "data": { "id": "10【鱼塘id】", "ground_id": "2【钓场id】", "status": "2【鱼塘状态 1待上架 2上架中 3 下架】", "seat_total": "10【总座位数,1-10个座位号】", "seat_select": "5【用户可选座位数】", "seat_num": "1,2,3,4,5【可选座位号 1-5为绿色可选 其他灰色不可选】", "seat_arr": "{{id:1, type: grey\/ green } } id 为座位号 type为颜色类型 grey 灰色 green 绿色", "seat_src": "http:\/\/daodao.shenruxiang.com\/sns\/avatar\/48016f6ef04b6284ed2926273f6ff1c3.png【座位图】" } }

bash

curl -X POST \ "http://sns.shenruxiang.com/api/v1/groundPondSeatSelect" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"user_id":5,"token":3,"pond_id":6}'