搜索时查询分类增加钩子

feat/task1-c-wallet
fengcheche 2021-06-30 12:49:58 +08:00
parent c5ec7a5cb3
commit ed11e38fde
1 changed files with 9 additions and 0 deletions

View File

@ -463,6 +463,15 @@ class SearchService
public static function GoodsCategoryList($params = [])
{
$data = [];
// 查询分类条件处理钩子
$hook_name = 'plugins_service_search_category_list_where';
Hook::listen($hook_name, [
'hook_name' => $hook_name,
'is_backend' => true,
'params' => &$params,
]);
if(MyC('home_search_is_category', 0) == 1)
{
$pid = empty($params['category_id']) ? 0 : intval($params['category_id']);