Authored by 周少峰

获取高级选项搜索条件

... ... @@ -110,7 +110,7 @@ class SearchModel
);
//接收高级选项
foreach ($_GET as $key =>$val) {
if (strpos('parameter_',$key) !== false) {
if (strpos($key, 'parameter_') !== false) {
$condition[$key] = (int) $val;
}
}
... ... @@ -220,7 +220,7 @@ class SearchModel
$data .= '<li><a style="display: block;" href="http://search.yohobuy.com/?query='.$v['item'].'" class="clearfix clear search-item" title="'.$v['item'].'" act="http://search.yohobuy.com/?query='.$v['item'].'"><span class="searchvalue" >'.$v['item'].'</span><span class="valuenum">约'.$v['frequency'].'个商品</span></a></li>';
}
}
echo $data;
return $data;
}
/**
... ...
... ... @@ -21,11 +21,13 @@ class SearchController extends WebAction
*/
public function suggestAction()
{
$suggest = '';
$query = rawurldecode($this->get('query'));
if ($query) {
$param['query'] = $query;
SearchModel::getSuggest($param);
$suggest = SearchModel::getSuggest($param);
}
echo $suggest;
}
/**
... ... @@ -35,7 +37,6 @@ class SearchController extends WebAction
{
$condition['msort'] = $this->get('msort');
$size = SearchModel::getSortSize($condition);
print_r($size); exit;
$this->echoJson($size);
}
}
\ No newline at end of file
... ...