Authored by Rock Zhang

修改有货币页面的有货币以及有货币过期提醒的数据处理格式

Code Review By Rock Zhang
... ... @@ -31,9 +31,10 @@ class Yohobuy
// /* 测试环境 */
// const API_URL = 'http://testapi.yoho.cn:28078/';
// const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_OLD = 'http://test2.open.yohobuy.com/';
const API_URL = 'http://192.168.102.205:8080/gateway/'; // 先临时使用网关
const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';
const API_OLD = 'http://test2.open.yohobuy.com/';
/* 预览环境 */
// const API_URL = 'http://preapi.yoho.cn/';
... ... @@ -43,10 +44,10 @@ class Yohobuy
// const API_OLD = 'http://api2.open.yohobuy.com/';
/* PC重构地址 */
const API_URL = 'http://test2.open.yohobuy.com/';
const SERVICE_URL = 'http://test.service.api.yohobuy.com/';
const YOHOBUY_URL = 'http://www.yohobuy.com/';
const API_OLD = 'http://api2.open.yohobuy.com/';
// const API_URL = 'http://test2.open.yohobuy.com/';
// const SERVICE_URL = 'http://test.service.api.yohobuy.com/';
// const YOHOBUY_URL = 'http://www.yohobuy.com/';
// const API_OLD = 'http://api2.open.yohobuy.com/';
/**
* 私钥列表
... ...
... ... @@ -198,11 +198,18 @@ class UserData
*/
public static function yohoCoinTotal($uid)
{
$param = Yohobuy::param();
/*$param = Yohobuy::param();
$param['method'] = 'app.yohocoin.total';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);*/
$param = Yohobuy::param();
$param['method'] = 'app.yoho.yohocoin';
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
... ...
... ... @@ -365,7 +365,8 @@ class UserModel
// 处理YOHO币数据
if (isset($yohoCoin['data']) && !empty($yohoCoin['data'])) {
$result['yohoCoin']['coinNum'] = $yohoCoin['data']['total'];
$result['yohoCoin']['coinNum'] = $yohoCoin['data']['yohocoin_num'];
$result['yohoCoin']['notice'] = $yohoCoin['data']['notice'];
}
return $result;
... ...