Authored by 周少峰

Merge branch 'feature/crowd' into release/5.0.1

@@ -470,6 +470,14 @@ class HelperSearch @@ -470,6 +470,14 @@ class HelperSearch
470 return $result; 470 return $result;
471 } 471 }
472 $params = self::$params; 472 $params = self::$params;
  473 + do {
  474 + if (isset($params['ageLevel']) && $params['ageLevel'] == 1) {
  475 + break;
  476 + }
  477 + if (count($filter['ageLevel']) === 1 && $filter['ageLevel'][0]['name'] === '成人') {
  478 + return $result;
  479 + }
  480 + }while(false);
473 $ageLevel = isset($params['ageLevel']) ? $params['ageLevel'] : ''; 481 $ageLevel = isset($params['ageLevel']) ? $params['ageLevel'] : '';
474 if (isset($params['ageLevel'])) { 482 if (isset($params['ageLevel'])) {
475 unset($params['ageLevel']); 483 unset($params['ageLevel']);
@@ -477,8 +485,7 @@ class HelperSearch @@ -477,8 +485,7 @@ class HelperSearch
477 if (self::$total == 0) { 485 if (self::$total == 0) {
478 return $result; 486 return $result;
479 } 487 }
480 -  
481 - sort($filter['ageLevel']); 488 +
482 foreach ($filter['ageLevel'] as $key => $val) { 489 foreach ($filter['ageLevel'] as $key => $val) {
483 if (intval($val['id']) === $ageLevel) { 490 if (intval($val['id']) === $ageLevel) {
484 self::$selected['ageLevel'] = array( 491 self::$selected['ageLevel'] = array(
@@ -48,20 +48,6 @@ @@ -48,20 +48,6 @@
48 </div> 48 </div>
49 {{/if}} 49 {{/if}}
50 50
51 - {{#if ageLevel}}  
52 - <div class="channel section">  
53 - <span class="title">年龄:</span>  
54 -  
55 - <div class="attr-content clearfix">  
56 - {{#each ageLevel}}  
57 - <a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">  
58 - {{name}}  
59 - </a>  
60 - {{/each}}  
61 - </div>  
62 - </div>  
63 - {{/if}}  
64 -  
65 {{#if sort}} 51 {{#if sort}}
66 <div class="sort section"> 52 <div class="sort section">
67 <span class="title">分类:</span> 53 <span class="title">分类:</span>
@@ -180,6 +166,20 @@ @@ -180,6 +166,20 @@
180 </div> 166 </div>
181 {{/ brand}} 167 {{/ brand}}
182 168
  169 + {{#if ageLevel}}
  170 + <div class="channel section">
  171 + <span class="title">人群:</span>
  172 +
  173 + <div class="attr-content clearfix">
  174 + {{#each ageLevel}}
  175 + <a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">
  176 + {{name}}
  177 + </a>
  178 + {{/each}}
  179 + </div>
  180 + </div>
  181 + {{/if}}
  182 +
183 {{#if price}} 183 {{#if price}}
184 <div class="price section"> 184 <div class="price section">
185 <span class="title">价格:</span> 185 <span class="title">价格:</span>