diff --git a/app/controller/frontend/SearchController.php b/app/controller/frontend/SearchController.php index 666322f..4f50b90 100644 --- a/app/controller/frontend/SearchController.php +++ b/app/controller/frontend/SearchController.php @@ -226,7 +226,9 @@ class SearchController extends BaseController $baseWhere = ['seller_id' => $this->sellerId, 'is_del' => 1]; $content = (new SubContent())->with(['thumbnail'=>function($q){ $q->field('id,name,url,type'); - },'category'])->where($baseWhere)->whereIn('id', $listSubIds ?: [0]); + },'category', 'cover'=>function($q){ + $q->field('id,name,url,type'); + }])->where($baseWhere)->whereIn('id', $listSubIds ?: [0]); $productIdSet = array_flip($productContentIds); $newsIdSet = array_flip($newsContentIds);