Authored by runner

fiter-age update

@@ -153,6 +153,7 @@ function getQueryString(name) { @@ -153,6 +153,7 @@ function getQueryString(name) {
153 shopId = getQueryString('shop_id'); 153 shopId = getQueryString('shop_id');
154 sort = getQueryString('sort'); 154 sort = getQueryString('sort');
155 outlets = getQueryString('outlets'); 155 outlets = getQueryString('outlets');
  156 +age_level = outlets = getQueryString('ageLevel');
156 157
157 /** 158 /**
158 * 筛选注册的回调,筛选子项点击后逻辑 159 * 筛选注册的回调,筛选子项点击后逻辑
@@ -271,6 +272,10 @@ function search(opt) { @@ -271,6 +272,10 @@ function search(opt) {
271 params.shop_id = shopId; 272 params.shop_id = shopId;
272 } 273 }
273 274
  275 + if (age_level) {
  276 + params.age_level = age_level
  277 + }
  278 +
274 if (sort) { 279 if (sort) {
275 params.sort = sort; 280 params.sort = sort;
276 } 281 }
@@ -58,8 +58,8 @@ @@ -58,8 +58,8 @@
58 <input class="query-param" type="hidden" data-attr="p_d" value="{{p_d}}"> 58 <input class="query-param" type="hidden" data-attr="p_d" value="{{p_d}}">
59 {{/if}} 59 {{/if}}
60 60
61 -{{#if age_level}}  
62 - <input class="query-param" type="hidden" data-attr="age_level" value="{{age_level}}"> 61 +{{#if ageLevel}}
  62 + <input class="query-param" type="hidden" data-attr="ageLevel" value="{{ageLevel}}">
63 {{/if}} 63 {{/if}}
64 64
65 {{#if channel}} 65 {{#if channel}}
@@ -61,6 +61,7 @@ class SearchController extends AbstractAction @@ -61,6 +61,7 @@ class SearchController extends AbstractAction
61 'gender' => FILTER_DEFAULT, 61 'gender' => FILTER_DEFAULT,
62 'channel' => FILTER_DEFAULT, 62 'channel' => FILTER_DEFAULT,
63 'outlets' => FILTER_DEFAULT, 63 'outlets' => FILTER_DEFAULT,
  64 + 'ageLevel' => FILTER_DEFAULT,
64 'p_d' => FILTER_DEFAULT,), false); 65 'p_d' => FILTER_DEFAULT,), false);
65 if (isset($condition['shop_id'])) { 66 if (isset($condition['shop_id'])) {
66 $condition['shopId'] = $condition['shop_id']; 67 $condition['shopId'] = $condition['shop_id'];
@@ -404,6 +405,7 @@ class SearchController extends AbstractAction @@ -404,6 +405,7 @@ class SearchController extends AbstractAction
404 'discount' => FILTER_DEFAULT, 405 'discount' => FILTER_DEFAULT,
405 'gender' => FILTER_DEFAULT, 406 'gender' => FILTER_DEFAULT,
406 'channel' => FILTER_DEFAULT, 407 'channel' => FILTER_DEFAULT,
  408 + 'ageLevel' => FILTER_DEFAULT,
407 'p_d' => FILTER_DEFAULT,), false); 409 'p_d' => FILTER_DEFAULT,), false);
408 410
409 // 转义分类 411 // 转义分类
@@ -422,6 +424,11 @@ class SearchController extends AbstractAction @@ -422,6 +424,11 @@ class SearchController extends AbstractAction
422 if (isset($condition['color'])) { 424 if (isset($condition['color'])) {
423 $condition['color'] = rawurldecode($condition['color']); 425 $condition['color'] = rawurldecode($condition['color']);
424 } 426 }
  427 + //
  428 + if (isset($condition['ageLevel'])) {
  429 + $condition['age_level'] = rawurldecode($condition['ageLevel']);
  430 + unset($condition['ageLevel']);
  431 + }
425 // 为了兼容现在运营在用的p_d 432 // 为了兼容现在运营在用的p_d
426 if (isset($condition['p_d'])) { 433 if (isset($condition['p_d'])) {
427 $condition['p_d'] = rawurldecode($condition['p_d']); 434 $condition['p_d'] = rawurldecode($condition['p_d']);
@@ -442,7 +449,7 @@ class SearchController extends AbstractAction @@ -442,7 +449,7 @@ class SearchController extends AbstractAction
442 if (isset($condition['style'])) { 449 if (isset($condition['style'])) {
443 $condition['style'] = rawurldecode($condition['style']); 450 $condition['style'] = rawurldecode($condition['style']);
444 } 451 }
445 - 452 +
446 // 区别各种列表页面的筛选数据 453 // 区别各种列表页面的筛选数据
447 $data = Product\SearchModel::getFilterData($condition); 454 $data = Product\SearchModel::getFilterData($condition);
448 } 455 }