...
|
...
|
@@ -229,9 +229,33 @@ class ShopModel |
|
|
array('href' => '', 'name' => $data['brandIntro']['brandName'], 'title' => $data['brandIntro']['brandName'])
|
|
|
)
|
|
|
);
|
|
|
// $data['name'] = '全部商品 ALL';
|
|
|
// $sort = self::getSort($res['sort']);
|
|
|
// $data['goodsMenu']['menuList'] = $sort;
|
|
|
|
|
|
// 搜索无商品时显示全部商品
|
|
|
if (isset($searchCondition['condition']['query']) &&
|
|
|
!empty($searchCondition['condition']['query']) &&
|
|
|
empty($data['goods'])) {
|
|
|
$data['searchEmpty'] = true;
|
|
|
|
|
|
unset($searchCondition['condition']['query']);
|
|
|
$allProUrl = array('product' => SearchData::getProductUrl($searchCondition['condition']));
|
|
|
|
|
|
//批量调接口获取数据
|
|
|
$allRes = Yohobuy::getMulti($allProUrl);
|
|
|
|
|
|
$allResult = HelperSearch::getList($allRes, array_merge(
|
|
|
array('defaultCover' => true),
|
|
|
$searchCondition['options']
|
|
|
), $searchCondition['userInput']);
|
|
|
|
|
|
$sort = self::getSort($res['sort'], $parameters['options']['misort'], $shopId);
|
|
|
$param = array_merge($searchCondition['userInput'], array('navBar' => 1, 'shopId' => $shopId));
|
|
|
|
|
|
$data['allGoods']['name'] = '全部商品 ALL';
|
|
|
$data['allGoods']['list'] = $allResult['goods'];
|
|
|
$data['allGoods']['opts'] = $allResult['opts'];
|
|
|
$data['allGoods']['goodsMenu']['menuList'] = $sort;
|
|
|
$data['allGoods']['goodsMenu']['url'] = self::$shopListUrl . '?' . http_build_query($param);
|
|
|
}
|
|
|
|
|
|
return $data;
|
|
|
|
...
|
...
|
|