feat/task1-c-wallet
devil_gong 2018-11-26 16:00:41 +08:00
parent 51db4d5d67
commit 83ba869a59
1 changed files with 13 additions and 1 deletions

View File

@ -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);
}
}