From 9cdff20146c7e915adccc0d26cf8ac185a4cd465 Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq.com> Date: Tue, 8 Sep 2026 14:58:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E8=BD=A6=E4=BD=8D=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/ParkingSpaceAttributes.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Models/ParkingSpaceAttributes.php b/app/Models/ParkingSpaceAttributes.php index 22bca01..ebfb811 100644 --- a/app/Models/ParkingSpaceAttributes.php +++ b/app/Models/ParkingSpaceAttributes.php @@ -41,7 +41,7 @@ class ParkingSpaceAttributes extends Model $model->where('is_default', 0); } $data = $model->get()->select( - ['id', 'attributes'] + ['id', 'attributes', 'import_diagram'] )->toArray(); foreach ($data as $key => $item) { $data[$key]['attributes'] @@ -50,6 +50,11 @@ class ParkingSpaceAttributes extends Model 2, $item['attributes'] ); + if ($is_default == 1) { + unset($item['import_diagram']); + } else { + $item['import_diagram_url'] = get_image_url($item['import_diagram']); + } } return $data; }