文档
测试

groundPondUpdate

POST
api/v1/groundPondCreate

接口描述

钓场鱼塘创建

请求参数

参数名
类型
描述
必填
user_id
integer
用户id:1
必填
token
integer
用户token:312dsae123e12da
必填
ground_id
integer
钓场id
必填
pond_id
integer
钓场鱼塘id
必填
name
string
鱼塘名称
必填
water_depth
string
鱼塘水深
必填
type
integer
鱼塘类型
必填
seat_type
integer
发放座位类型
必填
seat_total
integer
发放座位总数
必填
seat_select
integer
选择发放座位总数
必填
seat_num
string
发放座位数 1,2,3,4 逗号分隔
必填
people_num
integer
活动人数
必填
fish_list
string
鱼种类、数量、价格 json数组([{"name": "鲤鱼","weight": 100,"price": 15},{"name": "鲫鱼","weight": 80,"price": 20}])
必填
price
float
门票价
必填
desc
string
描述
必填
src
string
图片/视频 /xx1.jpg,/xx2.jpg 逗号分隔
必填
start_time
string
开始时间
必填
end_time
string
结束时间
必填

php

$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://sns.shenruxiang.com/api/v1/groundPondUpdate', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'user_id' => 5, 'token' => 11, 'ground_id' => 17, 'pond_id' => 17, 'name' => 'maxime', 'water_depth' => 'mollitia', 'type' => 11, 'seat_type' => 11, 'seat_total' => 3, 'seat_select' => 4, 'seat_num' => 'ex', 'people_num' => 20, 'fish_list' => 'saepe', 'price' => 4499043.885600983, 'desc' => 'vitae', 'src' => 'qui', 'start_time' => 'dolores', 'end_time' => 'placeat', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));

js

const url = new URL( "http://sns.shenruxiang.com/api/v1/groundPondUpdate" ); let headers = { "Content-Type": "application/json", "Accept": "application/json", }; let body = { "user_id": 5, "token": 11, "ground_id": 17, "pond_id": 17, "name": "maxime", "water_depth": "mollitia", "type": 11, "seat_type": 11, "seat_total": 3, "seat_select": 4, "seat_num": "ex", "people_num": 20, "fish_list": "saepe", "price": 4499043.885600983, "desc": "vitae", "src": "qui", "start_time": "dolores", "end_time": "placeat" } 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/groundPondUpdate" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"user_id":5,"token":11,"ground_id":17,"pond_id":17,"name":"maxime","water_depth":"mollitia","type":11,"seat_type":11,"seat_total":3,"seat_select":4,"seat_num":"ex","people_num":20,"fish_list":"saepe","price":4499043.885600983,"desc":"vitae","src":"qui","start_time":"dolores","end_time":"placeat"}'