RedenvelopesData.php
854 Bytes
<?php
namespace LibModels\Web\Home;
use Api\Yohobuy;
use Api\Sign;
class RedenvelopesData
{
/**
* 获取红包列表
* $uid 用户ID
*/
public static function getRedenvelopes($uid = 0)
{
$param = Yohobuy::param();
$param['method'] = 'app.yoho.redpacketList';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
/**
* 获取红包列表
* $uid 用户ID
*/
public static function getRedenvelopesTotal($uid = 0)
{
$param = Yohobuy::param();
$param['method'] = 'app.yoho.redpacketInfo';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
}