文档
测试

groundCreate

POST
api/v1/groundCreate

接口描述

创建钓场

请求参数

参数名
类型
描述
必填
user_id
integer
用户id:1
必填
token
integer
用户token:312dsae123e12da
必填
name
string
钓场名称:青岛黄花鱼钓场
必填
src
string
钓场图片/视频:http:xx.com/xx1.jpg,http:xx.com/xx2.jpg
必填
address
string
钓场地点(天津市武清区大屯路)
必填
mobile
string
手机号
必填
lng
string
经度:116.443938
必填
lat
string
纬度:39.961184
必填
position
string
钓场位置:杨柳树1023号
必填
place
string
导航定位
必填
area
float
面积:101.63
必填
desc
string
钓场描述:鱼塘好
必填

php

$client = new \GuzzleHttp\Client(); $response = $client->post( 'http://sns.shenruxiang.com/api/v1/groundCreate', [ 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'user_id' => 5, 'token' => 7, 'name' => 'sunt', 'src' => 'aperiam', 'address' => 'quo', 'mobile' => 'rerum', 'lng' => 'nulla', 'lat' => 'sed', 'position' => 'enim', 'place' => 'cum', 'area' => 42.1, 'desc' => 'et', ], ] ); $body = $response->getBody(); print_r(json_decode((string) $body));

js

const url = new URL( "http://sns.shenruxiang.com/api/v1/groundCreate" ); let headers = { "Content-Type": "application/json", "Accept": "application/json", }; let body = { "user_id": 5, "token": 7, "name": "sunt", "src": "aperiam", "address": "quo", "mobile": "rerum", "lng": "nulla", "lat": "sed", "position": "enim", "place": "cum", "area": 42.1, "desc": "et" } 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/groundCreate" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"user_id":5,"token":7,"name":"sunt","src":"aperiam","address":"quo","mobile":"rerum","lng":"nulla","lat":"sed","position":"enim","place":"cum","area":42.1,"desc":"et"}'