文档
测试

groundPondCreate

POST
api/v1/groundPondCreate

接口描述

钓场鱼塘创建

请求参数

参数名
类型
描述
必填
user_id
integer
用户id:1
必填
token
integer
用户token:312dsae123e12da
必填
ground_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 逗号分隔
必填
seat_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/groundPondCreate', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'user_id' => 18, 'token' => 10, 'ground_id' => 16, 'name' => 'deserunt', 'water_depth' => 'exercitationem', 'type' => 19, 'seat_type' => 19, 'seat_total' => 1, 'seat_select' => 19, 'seat_num' => 'dolorem', 'people_num' => 3, 'fish_list' => 'ut', 'price' => 97.0, 'desc' => 'in', 'src' => 'assumenda', 'seat_src' => 'maxime', 'start_time' => 'reprehenderit', 'end_time' => 'eum', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));

js

const url = new URL( "http://sns.shenruxiang.com/api/v1/groundPondCreate" ); let headers = { "Content-Type": "application/json", "Accept": "application/json", }; let body = { "user_id": 18, "token": 10, "ground_id": 16, "name": "deserunt", "water_depth": "exercitationem", "type": 19, "seat_type": 19, "seat_total": 1, "seat_select": 19, "seat_num": "dolorem", "people_num": 3, "fish_list": "ut", "price": 97, "desc": "in", "src": "assumenda", "seat_src": "maxime", "start_time": "reprehenderit", "end_time": "eum" } 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/groundPondCreate" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"user_id":18,"token":10,"ground_id":16,"name":"deserunt","water_depth":"exercitationem","type":19,"seat_type":19,"seat_total":1,"seat_select":19,"seat_num":"dolorem","people_num":3,"fish_list":"ut","price":97,"desc":"in","src":"assumenda","seat_src":"maxime","start_time":"reprehenderit","end_time":"eum"}'