From 31269bba1217f9a4d5d975b57be41889eed98445 Mon Sep 17 00:00:00 2001 From: wanghousheng Date: Sat, 23 Mar 2024 20:07:48 +0800 Subject: [PATCH] 1 --- app/api/controller/StoreKeeper.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/api/controller/StoreKeeper.php b/app/api/controller/StoreKeeper.php index 87ba10d3..589f2cf4 100644 --- a/app/api/controller/StoreKeeper.php +++ b/app/api/controller/StoreKeeper.php @@ -202,13 +202,13 @@ class StoreKeeper extends Controller $chat_image_id['file_path'] = getUrl($chat_image_id['file_path'], $chat_image_id['domain']); } $list['data'][$key]['transfer']['chat_image_ids'] = $chat_image_ids; -// if (!empty($value->transfer->transfer_image_id)) { -// $transfer_image_ids = UploadFile::whereIn('file_id', explode(",", $value->transfer->transfer_image_id))->field('file_id,file_path,file_type,storage,domain')->select(); -// foreach ($transfer_image_ids as &$transfer_image_id) { -// $transfer_image_id['file_path'] = getUrl($transfer_image_id['file_path'], $transfer_image_id['domain']); -// } -// $value->transfer->transfer_image_ids = $transfer_image_ids; -// } + } + if (!empty($value['transfer']) && !empty($value['transfer']['transfer_image_id'])) { + $transfer_image_ids = UploadFile::whereIn('file_id', explode(",", $value['transfer']['transfer_image_id']))->field('file_id,file_path,file_type,storage,domain')->select(); + foreach ($transfer_image_ids as &$transfer_image_id) { + $transfer_image_id['file_path'] = getUrl($transfer_image_id['file_path'], $transfer_image_id['domain']); + } + $list['data'][$key]['transfer']['transfer_image_ids'] = $transfer_image_ids; } } }