Authored by Rock Zhang

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

Code Review By Rock Zhang
@@ -31,9 +31,10 @@ class Yohobuy @@ -31,9 +31,10 @@ class Yohobuy
31 31
32 // /* 测试环境 */ 32 // /* 测试环境 */
33 // const API_URL = 'http://testapi.yoho.cn:28078/'; 33 // const API_URL = 'http://testapi.yoho.cn:28078/';
34 -// const SERVICE_URL = 'http://testservice.yoho.cn:28077/';  
35 -// const YOHOBUY_URL = 'http://www.yohobuy.com/';  
36 -// const API_OLD = 'http://test2.open.yohobuy.com/'; 34 + const API_URL = 'http://192.168.102.205:8080/gateway/'; // 先临时使用网关
  35 + const SERVICE_URL = 'http://testservice.yoho.cn:28077/';
  36 + const YOHOBUY_URL = 'http://www.yohobuy.com/';
  37 + const API_OLD = 'http://test2.open.yohobuy.com/';
37 38
38 /* 预览环境 */ 39 /* 预览环境 */
39 // const API_URL = 'http://preapi.yoho.cn/'; 40 // const API_URL = 'http://preapi.yoho.cn/';
@@ -43,10 +44,10 @@ class Yohobuy @@ -43,10 +44,10 @@ class Yohobuy
43 // const API_OLD = 'http://api2.open.yohobuy.com/'; 44 // const API_OLD = 'http://api2.open.yohobuy.com/';
44 45
45 /* PC重构地址 */ 46 /* PC重构地址 */
46 - const API_URL = 'http://test2.open.yohobuy.com/';  
47 - const SERVICE_URL = 'http://test.service.api.yohobuy.com/';  
48 - const YOHOBUY_URL = 'http://www.yohobuy.com/';  
49 - const API_OLD = 'http://api2.open.yohobuy.com/'; 47 +// const API_URL = 'http://test2.open.yohobuy.com/';
  48 +// const SERVICE_URL = 'http://test.service.api.yohobuy.com/';
  49 +// const YOHOBUY_URL = 'http://www.yohobuy.com/';
  50 +// const API_OLD = 'http://api2.open.yohobuy.com/';
50 51
51 /** 52 /**
52 * 私钥列表 53 * 私钥列表
@@ -198,11 +198,18 @@ class UserData @@ -198,11 +198,18 @@ class UserData
198 */ 198 */
199 public static function yohoCoinTotal($uid) 199 public static function yohoCoinTotal($uid)
200 { 200 {
201 - $param = Yohobuy::param(); 201 + /*$param = Yohobuy::param();
202 $param['method'] = 'app.yohocoin.total'; 202 $param['method'] = 'app.yohocoin.total';
203 $param['uid'] = $uid; 203 $param['uid'] = $uid;
204 $param['client_secret'] = Sign::getSign($param); 204 $param['client_secret'] = Sign::getSign($param);
205 205
  206 + return Yohobuy::get(Yohobuy::API_URL, $param);*/
  207 +
  208 + $param = Yohobuy::param();
  209 + $param['method'] = 'app.yoho.yohocoin';
  210 + $param['uid'] = $uid;
  211 + $param['client_secret'] = Sign::getSign($param);
  212 +
206 return Yohobuy::get(Yohobuy::API_URL, $param); 213 return Yohobuy::get(Yohobuy::API_URL, $param);
207 } 214 }
208 215
@@ -365,7 +365,8 @@ class UserModel @@ -365,7 +365,8 @@ class UserModel
365 365
366 // 处理YOHO币数据 366 // 处理YOHO币数据
367 if (isset($yohoCoin['data']) && !empty($yohoCoin['data'])) { 367 if (isset($yohoCoin['data']) && !empty($yohoCoin['data'])) {
368 - $result['yohoCoin']['coinNum'] = $yohoCoin['data']['total']; 368 + $result['yohoCoin']['coinNum'] = $yohoCoin['data']['yohocoin_num'];
  369 + $result['yohoCoin']['notice'] = $yohoCoin['data']['notice'];
369 } 370 }
370 371
371 return $result; 372 return $result;