文档
测试

groundAccountDetail

POST
api/v1/groundAccountDetail

接口描述

账户余额以及流水记录

请求参数

参数名
类型
描述
必填
user_id
integer
用户id
必填
token
integer
用户token
必填
type
integer
类型 account(余额) recharge(充值) cash_out(提现) bay_back(回购)
必填

php

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

js

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

返回值

{ "code": 0, "msg": "请求成功", "data": { "money": "56.45【余额】", "list": [ { "balance": "300【可用余额】", "type": "1【1.充值, 2.提现 3.回购 (交易类型)】", "money": "200【交易金额】", "source": "充值-微信充值200元【交易说明】", "user_name": "武大【交易用户】", "create_time": "2020-09-10 00:00:00【交易时间】" }, { "balance": 100, "money": "100", "type": 1, "source": "充值-支付宝充值100元", "user_name": "李四", "create_time": "2020-09-09 00:00:00" } ] } }

bash

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