Authored by 郝肖肖

搜索 查询店铺接口

... ... @@ -594,4 +594,18 @@ class SearchData
{
return Yohobuy::get(self::getUrl(), $param);
}
/**
* 根据品牌id查询店铺列表接口
* @param type array $param
* @return type []
*/
public static function getQueryShopsByBrandId($brandId)
{
$param = Yohobuy::param();
$param['method'] = 'app.shop.queryShopsByBrandId';
$param['brand_id'] = $brandId;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
}
\ No newline at end of file
... ...
... ... @@ -596,7 +596,7 @@ class HelperSearch
//已选中品牌标签名
$existName = array();
foreach ($brand as $key => $v) {
if (!$v['brand_alif']) {
if (empty($v['brand_alif'])) {
$v['brand_alif'] = substr($v['brand_name_en'], 0, 1);
if (!$v['brand_alif']) {
$pinyin = self::pinYin($v['brand_name']);
... ...

48.3 KB | W: | H:

48.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin

8.64 KB | W: | H:

8.64 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -443,11 +443,44 @@ class ShopModel
*/
public static function goodsTabBar($data)
{
$result = array();
if (isset($data['resource_data'])) {
$result = $data['resource_data'];
$more = array(
'name' => 'MORE',
'href' => self::$shopListUrl
);
$result = array(
'hot' => array(),
'new' => array()
);
if (empty($data['resource_data'])) {
return $result;
}
if (isset($data['resource_data']['hot'])) {
foreach ($data['resource_data']['hot'] as $val) {
if (empty($val['url'])) {
continue;
}
$result['hot'][] = array(
'name' => $val['name'],
'href' => 'http://' . trim($val['url'], 'http://'),
);
}
}
if (isset($data['resource_data']['new'])) {
foreach ($data['resource_data']['new'] as $val) {
if (empty($val['url'])) {
continue;
}
$result['new'][] = array(
'name' => $val['name'],
'href' => 'http://' . trim($val['url'], 'http://'),
);
}
}
$result['hot'][] = $more;
$result['new'][] = $more;
return $result;
}
... ...