提交 83ba869a 编写于 作者: D devil_gong

优化

上级 51db4d5d
......@@ -43,8 +43,20 @@ class SearchController extends CommonController
*/
public function Index()
{
// 搜索记录
SearchService::SearchAdd($this->params);
// 获取数据
$result = SearchService::GoodsList($this->data_post);
$result['category'] = GoodsService::GoodsCategoryRow(['id'=>$this->data_post['category_id']]);
// 分类
if(!empty($this->data_post['category_id']))
{
$result['category'] = GoodsService::GoodsCategoryRow(['id'=>$this->data_post['category_id']]);
} else {
$result['category'] = [];
}
$this->ajaxReturn(L('common_operation_success'), 0, $result);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册