From 9bbcb5e934d503d23414fab57ecaba1e17e7c585 Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Fri, 9 Aug 2024 04:11:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E7=89=87=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/IndexLogic.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/api/logic/IndexLogic.php b/app/api/logic/IndexLogic.php index c51e6454..eadc6987 100755 --- a/app/api/logic/IndexLogic.php +++ b/app/api/logic/IndexLogic.php @@ -235,9 +235,12 @@ class IndexLogic extends Logic } else if ($v['mall_type'] == 1) { $ids = explode(',', $v['mall_news_goods_id']); foreach ($ids as $k => &$v2) { - $arr[$k] = MallNewsFile::where('mall_news_shop_id', $v2)->field('mall_news_shop_id, src as image')->select()->toArray(); + $res = MallNewsFile::where('mall_news_shop_id', $v2)->field('mall_news_shop_id, src')->select()->toArray(); + foreach ($res as &$v3) { + $v3['src'] = UrlServer::getFileUrl('uploads/images/' . $v3['src']); + } + $arr[$k] = $res; } - $v['shop'] = $arr; } }