Authored by 周少峰

列表页左侧默认不展示分类,模板文件BK修改

... ... @@ -89,6 +89,8 @@ class HelperSearch
$result['shopEntry'] = isset($data['shop']) && !empty($data['shop']) ? self::shop($data['shop'], $data['sort']['sort']) : array();
//分页
$result['pager'] = self::pager($result['totalCount'],$options['viewNum']-1);
//浏览记录
$result['latestWalk'] = array();
//选中条件
$result['filters']['checkedConditions'] = self::getSelected();
if (isset($options['controller']) && $options['controller'] == 'Search') {
... ... @@ -134,7 +136,7 @@ class HelperSearch
if (!empty($val['default_images'])) {
$val['default_images'] = Images::getImageUrl($val['default_images'],$imgSize[0],$imgSize[1]);
}
$goods[] = array(
$good = array(
'tags' => array(
'isNew' => $isNew,
'isLimit' => $isLimit
... ... @@ -143,12 +145,16 @@ class HelperSearch
'thumb' => $val['default_images'],
'name' => $val['product_name'],
'salePrice' => $val['sales_price'],
'marketPrice' => $val['market_price'],
'isFew' => $isFew,
'skn' => $val['product_skn'],
'showColBtn' => true,
'coled' => true
);
//市场价不等于售价时显示
if ($val['market_price'] != $val['sales_price']) {
$good['marketPrice'] = $val['market_price'];
}
$goods[] = $good;
}
return $goods;
}
... ... @@ -459,14 +465,14 @@ class HelperSearch
{
$params = self::$params;
$paramsValue = array_filter($params);
if (!$isAjax && empty($paramsValue)) {
return array();
}
$sizeId = isset($params['size']) && !empty($params['size']) ? $params['size'] : '';
if (isset($params['size'])) {
unset($params['size']);
}
$result = array();
if (!$isAjax && empty($paramsValue)) {
return array();
}
if (isset($filter['size']) && !empty($filter['size'])) {
$size = $filter['size'];
foreach ($size as $k=> $v) {
... ... @@ -485,7 +491,7 @@ class HelperSearch
'checked' => isset(self::$params['size']) && self::$params['size'] == $v['size_id'] ? true : false
);
}
if (self::checkSearch('size')) {
if ( self::checkSearch('size')) {
return array();
}
}
... ... @@ -940,8 +946,8 @@ class HelperSearch
}
if ($data) {
$result['conditions'] = $data;
$result['clearUrl'] = self::current();
}
$result['clearUrl'] = self::current();
return $result;
}
... ...
... ... @@ -179,7 +179,7 @@
</div>
{{/if}}
<div class="size section hide">
<div class="size section {{#unless size}}hide{{/unless}}">
<span class="title">尺码:</span>
<div class="attr-content clearfix">
... ...
... ... @@ -154,6 +154,7 @@ class SearchModel
//$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']);
$result = Yohobuy::getMulti($urlList, array(), true);
// 组织模板数据
$data = HelperSearch::getList($result, $searchCondition['options']);
return $data;
... ...