Authored by 周少峰

搜索筛选shopop_id

... ... @@ -133,6 +133,11 @@ function search(opt) {
$pre.addClass('active');
switch (opt.type) {
case 'shop_id':
ext = {
shop_id: opt.id
};
break;
case 'gender':
ext = {
gender: opt.id
... ...
{{#if shopId}}
<input class="query-param" type="hidden" data-attr="shop_id" value="{{shopId}}">
{{/if}}
{{#if brand}}
<input class="query-param" type="hidden" data-attr="brand" value="{{brand}}">
{{/if}}
... ...
... ... @@ -52,7 +52,7 @@ class SearchController extends AbstractAction
'discount' => FILTER_DEFAULT,
'gender' => FILTER_DEFAULT,
'p_d' => FILTER_DEFAULT,), false);
$condition['shopId'] = $condition['shop_id'];
$query = empty($condition['query']) ? null : strtolower(trim($condition['query']));
if (isset($condition['discount'])) {
$condition['p_d'] = rawurldecode($condition['discount']);
... ...
... ... @@ -95,8 +95,6 @@ class SearchModel
// 区别各种列表页面的筛选数据
if (isset($condition['shop_id'])) {
$condition['shop'] = $condition['shop_id'];
unset($condition['shop_id']);
$listData = SearchData::searchByCondition($condition);
$exclude = 'null';
}elseif (isset($condition['brand'])) {
... ...