文档
测试

bannerList

POST
api/v1/bannerList

接口描述

轮播图列表

请求参数

参数名
类型
描述
必填
user_id
integer
用户id
必填
token
integer
用户token
必填
position_type
integer
位置类型
必填

php

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

js

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

返回值

{ "code": 0, "msg": "请求成功", "data": [ { "id": 1, "title": "轮播图1", "sort": 10, "src": "\/uploads\/image\/20200907\/2020090710510243.jpg", "image_type": "1【图片类型:1.图片,2.视频】", "position_type": "1【位置类型:1.首页轮播,2.鱼塘轮播】" } ] }

bash

curl -X POST \ "http://sns.shenruxiang.com/api/v1/bannerList" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{"user_id":20,"token":8,"position_type":10}'