From e0b45888edc0250761315728ed6f7a27b7cec23d Mon Sep 17 00:00:00 2001 From: xucong <850806214@qq.com> Date: Fri, 17 Apr 2026 21:52:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/ShopLogic.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/api/logic/ShopLogic.php b/app/api/logic/ShopLogic.php index 5e943a30..e52daf73 100644 --- a/app/api/logic/ShopLogic.php +++ b/app/api/logic/ShopLogic.php @@ -148,7 +148,12 @@ class ShopLogic extends Logic $shop = Shop::field($field) ->where($c) ->append([ 'type_desc', 'is_expire' ]) - ->find(); + ->findOrEmpty(); + if($shop->isEmpty()) { + return []; + }else{ + $shop = $shop->toArray(); + } // $shop['logo'] = UrlServer::getFileUrl($shop['logo'] ? : ShopEnum::DEFAULT_LOGO); $shop['background'] = UrlServer::getFileUrl($shop['background'] ? : ShopEnum::DEFAULT_BG);