Authored by runner

fiter-age update

... ... @@ -153,6 +153,7 @@ function getQueryString(name) {
shopId = getQueryString('shop_id');
sort = getQueryString('sort');
outlets = getQueryString('outlets');
age_level = outlets = getQueryString('ageLevel');
/**
* 筛选注册的回调,筛选子项点击后逻辑
... ... @@ -271,6 +272,10 @@ function search(opt) {
params.shop_id = shopId;
}
if (age_level) {
params.age_level = age_level
}
if (sort) {
params.sort = sort;
}
... ...
... ... @@ -58,8 +58,8 @@
<input class="query-param" type="hidden" data-attr="p_d" value="{{p_d}}">
{{/if}}
{{#if age_level}}
<input class="query-param" type="hidden" data-attr="age_level" value="{{age_level}}">
{{#if ageLevel}}
<input class="query-param" type="hidden" data-attr="ageLevel" value="{{ageLevel}}">
{{/if}}
{{#if channel}}
... ...
... ... @@ -61,6 +61,7 @@ class SearchController extends AbstractAction
'gender' => FILTER_DEFAULT,
'channel' => FILTER_DEFAULT,
'outlets' => FILTER_DEFAULT,
'ageLevel' => FILTER_DEFAULT,
'p_d' => FILTER_DEFAULT,), false);
if (isset($condition['shop_id'])) {
$condition['shopId'] = $condition['shop_id'];
... ... @@ -404,6 +405,7 @@ class SearchController extends AbstractAction
'discount' => FILTER_DEFAULT,
'gender' => FILTER_DEFAULT,
'channel' => FILTER_DEFAULT,
'ageLevel' => FILTER_DEFAULT,
'p_d' => FILTER_DEFAULT,), false);
// 转义分类
... ... @@ -422,6 +424,11 @@ class SearchController extends AbstractAction
if (isset($condition['color'])) {
$condition['color'] = rawurldecode($condition['color']);
}
//
if (isset($condition['ageLevel'])) {
$condition['age_level'] = rawurldecode($condition['ageLevel']);
unset($condition['ageLevel']);
}
// 为了兼容现在运营在用的p_d
if (isset($condition['p_d'])) {
$condition['p_d'] = rawurldecode($condition['p_d']);
... ... @@ -442,7 +449,7 @@ class SearchController extends AbstractAction
if (isset($condition['style'])) {
$condition['style'] = rawurldecode($condition['style']);
}
// 区别各种列表页面的筛选数据
$data = Product\SearchModel::getFilterData($condition);
}
... ...