...
|
...
|
@@ -60,8 +60,18 @@ class BrandModel |
|
|
// 搜索链接地址
|
|
|
$result['searchUrl'] = Helpers::url('/brands/search', null);
|
|
|
|
|
|
/* 顶部的轮翻广告列表 */
|
|
|
if (!empty($brand['brandTop'][0]['data'])) {
|
|
|
/* 顶部的轮翻广告或热门品牌列表(当没有轮翻广告的情况下会是这个样子的! 此处是根据接口改造成的逻辑) */
|
|
|
if (!empty($brand['brandTop'][0]['data']['list'])) {
|
|
|
$build = array();
|
|
|
foreach ($brand['brandTop'][0]['data']['list'] as $value) {
|
|
|
$build['url'] = Helpers::getFilterUrl($value['url']);
|
|
|
$build['img'] = Helpers::getImageUrl($value['src'], 144, 144);
|
|
|
$build['name'] = $value['name'];
|
|
|
$result['hotBrand']['list'][] = $build;
|
|
|
}
|
|
|
}
|
|
|
// 顶部的轮翻广告列表
|
|
|
elseif (!empty($brand['brandTop'][0]['data'])) {
|
|
|
$build = array();
|
|
|
foreach ($brand['brandTop'][0]['data'] as $value) {
|
|
|
$build['url'] = Helpers::getFilterUrl($value['url']);
|
...
|
...
|
@@ -71,7 +81,7 @@ class BrandModel |
|
|
}
|
|
|
}
|
|
|
|
|
|
/* 顶部的热门品牌列表 */
|
|
|
/* 顶部的热门品牌列表 (备注: 当没有轮翻广告的时候,此处内部的foreach不会被执行) */
|
|
|
if (!empty($brand['brandTop'][1]['data']['list'])) {
|
|
|
$build = array();
|
|
|
foreach ($brand['brandTop'][1]['data']['list'] as $value) {
|
...
|
...
|
|