Authored by 周少峰

Merge branch 'feature/crowd' into release/5.0.1

... ... @@ -470,6 +470,14 @@ class HelperSearch
return $result;
}
$params = self::$params;
do {
if (isset($params['ageLevel']) && $params['ageLevel'] == 1) {
break;
}
if (count($filter['ageLevel']) === 1 && $filter['ageLevel'][0]['name'] === '成人') {
return $result;
}
}while(false);
$ageLevel = isset($params['ageLevel']) ? $params['ageLevel'] : '';
if (isset($params['ageLevel'])) {
unset($params['ageLevel']);
... ... @@ -478,7 +486,6 @@ class HelperSearch
return $result;
}
sort($filter['ageLevel']);
foreach ($filter['ageLevel'] as $key => $val) {
if (intval($val['id']) === $ageLevel) {
self::$selected['ageLevel'] = array(
... ...
... ... @@ -48,20 +48,6 @@
</div>
{{/if}}
{{#if ageLevel}}
<div class="channel section">
<span class="title">年龄:</span>
<div class="attr-content clearfix">
{{#each ageLevel}}
<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">
{{name}}
</a>
{{/each}}
</div>
</div>
{{/if}}
{{#if sort}}
<div class="sort section">
<span class="title">分类:</span>
... ... @@ -180,6 +166,20 @@
</div>
{{/ brand}}
{{#if ageLevel}}
<div class="channel section">
<span class="title">人群:</span>
<div class="attr-content clearfix">
{{#each ageLevel}}
<a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">
{{name}}
</a>
{{/each}}
</div>
</div>
{{/if}}
{{#if price}}
<div class="price section">
<span class="title">价格:</span>
... ...