From af757ffb5b69705b77260d800ac696d1f279fa73 Mon Sep 17 00:00:00 2001 From: lccsw <1127794702@qq.com> Date: Wed, 18 Aug 2021 10:53:04 +0800 Subject: [PATCH] edit-api-auto-series2 --- api/controllers/wxapp/app/Series.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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){