Authored by Rock Zhang

修复品牌一览顶部banner不显示的bug,接口数据格式变化导致

... ... @@ -84,6 +84,18 @@ class BrandModel
$result['bannerTop']['list'][] = $build;
}
}
// 顶部的轮翻广告列表
elseif (!empty($brand['brandTop']['list'][0]['data'])) {
$build = array();
foreach ($brand['brandTop']['list'][0]['data'] as $value) {
if (isset($value['url'])) {
$build['url'] = Helpers::getFilterUrl($value['url']);
}
$build['img'] = Helpers::getImageUrl($value['src'], 640, 310);
$build['title'] = $value['title'];
$result['bannerTop']['list'][] = $build;
}
}
/* 顶部的热门品牌列表 (备注: 当没有轮翻广告的时候,此处内部的foreach不会被执行) */
if (!empty($brand['brandTop'][1]['data']['list'])) {
... ...