From 4dbd2a3bef87e8a0a97eed402c5c4e2093debfb8 Mon Sep 17 00:00:00 2001 From: gcd Date: Tue, 22 Apr 2025 23:27:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B4=BE=E5=8D=95?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=97=A0=E5=9B=BE=E7=89=87=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/model/OrderDispatch.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/application/common/model/OrderDispatch.php b/application/common/model/OrderDispatch.php index 4de16f0..7ae55f7 100644 --- a/application/common/model/OrderDispatch.php +++ b/application/common/model/OrderDispatch.php @@ -21,6 +21,10 @@ class OrderDispatch extends Model public function getArriveImagesAttr($val) { + if (empty($val)) { + return []; + } + $images = explode(',', $val); foreach ($images as $k => $v) { $images[$k] = cdnurl($v, true); @@ -31,6 +35,10 @@ class OrderDispatch extends Model public function getImagesAttr($val) { + if (empty($val)) { + return []; + } + $images = explode(',', $val); foreach ($images as $k => $v) { $images[$k] = cdnurl($v, true); @@ -41,6 +49,10 @@ class OrderDispatch extends Model public function getImageAttr($val) { + if (empty($val)) { + return ''; + } + return cdnurl($val, true); } }