CurrencyData.php 1.05 KB
<?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);
    }

}