diff --git a/api/controllers/wxapp/app/Series.php b/api/controllers/wxapp/app/Series.php index 3a61d2b6..1b50fc46 100644 --- a/api/controllers/wxapp/app/Series.php +++ b/api/controllers/wxapp/app/Series.php @@ -42,7 +42,10 @@ class Series extends Wxapp{ $str_brands = implode(',',$auto_brands); $where["id in ($str_brands)"] = null; } - + if($id){ //只显示相同品牌 + $series = $this->auto_series_model->get(['id'=>$id],'brand_id'); + $series['brand_id'] && $where['brand_id'] = $series['brand_id']; + } $rows = $this->auto_series_model-> select($where,'',1,20,'id,brand_id,name'); $list = []; if($rows){