CurrencyData.php
1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace LibModels\Web\Home;
use Api\Yohobuy;
use Api\Sign;
class CurrencyData
{
/**
* 有货币列表数据
*
* @param int $uid 用户ID
* @param array $condition 条件
* @return array 有货币接口返回的数据
*/
public static function yohoCoinList($uid, $condition = array())
{
$param = Yohobuy::param();
$param['method'] = 'app.yohocoin.lists';
$param['uid'] = $uid;
$param['page'] = 1;
$param['limit'] = 15;
$param = array_merge($param, $condition);
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(API_URL, $param);
}
/**
* 有货币总数
* @param $uid
* @return array
*/
public static function yohoCoinTotal($uid)
{
$param = Yohobuy::param();
$param['method'] = 'app.yoho.yohocoin';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(API_URL, $param);
}
}