Authored by hf

fixes bug to guang plusstar data show empty

... ... @@ -21,7 +21,7 @@ use LibModels\Wap\Product\SearchData;
class PlusstarData
{
const URI_BRANDLIST = 'guang/api/v1/plustar/getlist';
const URI_BRANDLIST = 'guang/api/v3/plustar/getlist';
const URI_BRANDINFO_PLUSSTAR = 'guang/service/v3/plustar/'; // 'guang/service/v3/plustar/'
const URI_BRANDINFO_FAVORITE = 'shops/service/v1/favorite/';
const URI_BRANDINFO_ARTICLE = 'guang/service/v1/article/';
... ... @@ -45,19 +45,20 @@ class PlusstarData
// 公共的参数
$param = Yohobuy::param();
$param['brand_type'] = '1';
$param['gender'] = $gender;
$param['yh_channel'] = $channel;
// 构建推荐的品牌参数及调用接口的URL
$build = $param;
$build['is_recommend'] = '1';
$build['brand_type'] = '4';
//$build['is_recommend'] = '1';
$build['client_secret'] = Sign::getSign($build);
$urlList['recom'] = Yohobuy::httpBuildQuery($url, $build);
// 构建所有的品牌参数及调用接口的URL
$build = $param;
$build['is_recommend'] = '0';
$build['brand_type'] = '1';
//$build['is_recommend'] = '0';
$build['client_secret'] = Sign::getSign($build);
$urlList['all'] = Yohobuy::httpBuildQuery($url, $build);
... ...
... ... @@ -51,7 +51,7 @@ class PlusstarModel
}
$result = array();
$brandList = PlusstarData::firstBrandList($gender, $channel);
$brandList = PlusstarData::firstBrandList($gender, $channel);
if (!empty($brandList['recom']['data']['list'][0]['data'])) {
$result['ps']['star'] = self::formatData($brandList['recom']['data']['list'][0]['data'], $gender, true);
//$result['ps']['sName'] = isset($brandList['recom']['data']['brand_type_name']) ? $brandList['recom']['data']['brand_type_name'] : '';
... ... @@ -107,7 +107,7 @@ class PlusstarModel
}
$result = array();
$brandList = PlusstarData::brandList($gender, $channel);
$brandList = PlusstarData::brandList($gender, $channel);
if (!empty($brandList['star']['data']['list'][0]['data'])) {
$result['ps']['star'] = self::formatData($brandList['star']['data']['list'][0]['data'], $gender, false);
//$result['ps']['pName'] = isset($brandList['star']['data']['brand_type_name']) ? $brandList['star']['data']['brand_type_name'] : '';
... ...