...
|
...
|
@@ -154,8 +154,6 @@ class BrandModel |
|
|
|
|
|
$brand = BrandData::getBrandsData($channel);
|
|
|
if (!empty($brand['data']['brands'])) {
|
|
|
$list = array();
|
|
|
$build = array();
|
|
|
foreach ($brand['data']['brands'] as $char => $value) {
|
|
|
$build = array();
|
|
|
foreach ($value as $row) {
|
...
|
...
|
@@ -174,4 +172,54 @@ class BrandModel |
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 品牌搜索历史
|
|
|
* @param int $uid
|
|
|
* @author sefon 2016-5-17 12:12:28
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function branchSearchHistory($uid)
|
|
|
{
|
|
|
$result = array();
|
|
|
$list = BrandData::branchSearchHistory($uid);
|
|
|
do {
|
|
|
if (!isset($list['code']) || $list['code'] != 200 || !isset($list['data']) || empty($list['data'])) {
|
|
|
break;
|
|
|
}
|
|
|
foreach ($list['data'] as $key => $val) {
|
|
|
$result[] = array(
|
|
|
'url' => isset($val['brandDomain']) ? Helpers::url('', '', $val['brandDomain']) : 'test',
|
|
|
'id' => $val['id'],
|
|
|
'name' => $val['brandName']
|
|
|
);
|
|
|
}
|
|
|
} while(false);
|
|
|
|
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 热搜品牌
|
|
|
* @author sefon 2016-5-17 12:20:26
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function branchSearchHot()
|
|
|
{
|
|
|
$result = array();
|
|
|
$hot = BrandData::hotSearchBrands();
|
|
|
do {
|
|
|
if (!isset($hot['code']) || $hot['code'] != 200 || !isset($hot['data']) || empty($hot['data'])) {
|
|
|
break;
|
|
|
}
|
|
|
foreach ($hot['data'] as $key => $val) {
|
|
|
$result[] = array(
|
|
|
'url' => isset($val['brandDomain']) ? Helpers::url('', '', $val['brandDomain']) : 'test',
|
|
|
'id' => $val['id'],
|
|
|
'name' => $val['brandName']
|
|
|
);
|
|
|
}
|
|
|
} while(false);
|
|
|
|
|
|
return $result;
|
|
|
}
|
|
|
} |
...
|
...
|
|