...
|
...
|
@@ -16,6 +16,9 @@ class SearchController extends AbstractAction |
|
|
*/
|
|
|
public function indexAction()
|
|
|
{
|
|
|
// 设置客户端浏览器1小时内不改变
|
|
|
$this->setLastModified(mktime(date('H'), 0, 0, date('n'), date('j'), date('Y')));
|
|
|
|
|
|
$this->setNavHeader('搜索', true, SITE_MAIN);
|
|
|
|
|
|
//$this->_view->html('search');
|
...
|
...
|
@@ -151,10 +154,10 @@ class SearchController extends AbstractAction |
|
|
|
|
|
// 右下角的购物车链接
|
|
|
$data['goodList']['cartUrl'] = Helpers::url('/cart/index/index', null);
|
|
|
|
|
|
|
|
|
// 显示底部悬浮下载
|
|
|
$data['showDownloadApp'] = true;
|
|
|
|
|
|
|
|
|
// 显示页面底部登录信息
|
|
|
$data['pageFooter'] = true;
|
|
|
|
...
|
...
|
@@ -207,7 +210,7 @@ class SearchController extends AbstractAction |
|
|
'discount' => FILTER_DEFAULT,
|
|
|
'gender' => FILTER_DEFAULT,
|
|
|
'p_d' => FILTER_DEFAULT,
|
|
|
'page' => FILTER_VALIDATE_INT, ), false);
|
|
|
'page' => FILTER_VALIDATE_INT,), false);
|
|
|
// 转义分类
|
|
|
if (isset($condition['sort'])) {
|
|
|
$condition['sort'] = rawurldecode($condition['sort']);
|
...
|
...
|
@@ -225,7 +228,7 @@ class SearchController extends AbstractAction |
|
|
$type = $this->get('type', '');
|
|
|
$order = $this->get('order', 0);
|
|
|
$condition['order'] = Helpers::transOrder($order, $type);
|
|
|
|
|
|
|
|
|
// 过滤掉值为空的条件
|
|
|
$condition = array_filter($condition);
|
|
|
|
...
|
...
|
@@ -244,9 +247,8 @@ class SearchController extends AbstractAction |
|
|
//
|
|
|
// /* 精确搜索品类 */
|
|
|
// $data = Product\ListModel::getClassData($condition);
|
|
|
|
|
|
|
|
|
$data = Product\SearchModel::getSearchData($condition);
|
|
|
|
|
|
} while (false);
|
|
|
|
|
|
if (empty($data['new'])) {
|
...
|
...
|
@@ -309,15 +311,14 @@ class SearchController extends AbstractAction |
|
|
*
|
|
|
* @return array 模糊搜索的结果
|
|
|
*/
|
|
|
/*public function fuzzysearch()
|
|
|
{
|
|
|
if ($this->isAjax()) {
|
|
|
$keyword = $this->post('keyword', '');
|
|
|
/* public function fuzzysearch()
|
|
|
{
|
|
|
if ($this->isAjax()) {
|
|
|
$keyword = $this->post('keyword', '');
|
|
|
|
|
|
$result = SearchData::searchFuzzyDatas($keyword);
|
|
|
|
|
|
$this->echoJson($result);
|
|
|
}
|
|
|
}*/
|
|
|
$result = SearchData::searchFuzzyDatas($keyword);
|
|
|
|
|
|
$this->echoJson($result);
|
|
|
}
|
|
|
} */
|
|
|
} |
...
|
...
|
|