Authored by hf

code review by fei.hong : do shopping cart

@@ -18,17 +18,17 @@ class Yohobuy @@ -18,17 +18,17 @@ class Yohobuy
18 { 18 {
19 /* 正式环境 */ 19 /* 正式环境 */
20 // php API 20 // php API
21 -// const API_URL = 'http://api2.open.yohobuy.com/';  
22 -// const API_URL2 = 'http://api.open.yohobuy.com/';  
23 -// const SERVICE_URL = 'http://service.api.yohobuy.com/';  
24 -// const YOHOBUY_URL = 'http://www.yohobuy.com/'; 21 + const API_URL = 'http://api2.open.yohobuy.com/';
  22 + const API_URL2 = 'http://api.open.yohobuy.com/';
  23 + const SERVICE_URL = 'http://service.api.yohobuy.com/';
  24 + const YOHOBUY_URL = 'http://www.yohobuy.com/';
25 25
26 //java API 26 //java API
27 - const API_URL = 'http://apih5.yoho.cn/';  
28 - const API_URL2 = 'http://apih5.yoho.cn/';  
29 - const SERVICE_URL = 'http://serviceh5.yoho.cn/';  
30 - const YOHOBUY_URL = 'http://www.yohobuy.com/';  
31 - const API_OLD = 'http://api2.open.yohobuy.com/'; 27 +// const API_URL = 'http://apih5.yoho.cn/';
  28 +// const API_URL2 = 'http://apih5.yoho.cn/';
  29 +// const SERVICE_URL = 'http://serviceh5.yoho.cn/';
  30 +// const YOHOBUY_URL = 'http://www.yohobuy.com/';
  31 +// const API_OLD = 'http://api2.open.yohobuy.com/';
32 32
33 /* 测试环境 */ 33 /* 测试环境 */
34 // const API_URL = 'http://testapi.yoho.cn:28078/'; // 'http://192.168.102.205:8080/gateway/' 34 // const API_URL = 'http://testapi.yoho.cn:28078/'; // 'http://192.168.102.205:8080/gateway/'
@@ -25,8 +25,14 @@ class Channel @@ -25,8 +25,14 @@ class Channel
25 if (empty($data)) { 25 if (empty($data)) {
26 return array(); 26 return array();
27 } 27 }
  28 + $type = '';
  29 + if(in_array($channel, array('boys','girls','kids','lifestyle'))){
  30 + $type = $channel;
  31 + } else {
  32 + $type = Helpers::getChannelNameByCookie();
  33 + }
28 // 通用处理器 34 // 通用处理器
29 - $result = Process::getContent($data, Helpers::getChannelNameByCookie()); 35 + $result = Process::getContent($data, $type);
30 $channelResult = array(); 36 $channelResult = array();
31 if (isset(self::$formatChannel[$channel])) { 37 if (isset(self::$formatChannel[$channel])) {
32 $class = self::$formatChannel[$channel]; 38 $class = self::$formatChannel[$channel];