diff --git a/app/api/controller/Store.php b/app/api/controller/Store.php index 402c180b..59335b64 100644 --- a/app/api/controller/Store.php +++ b/app/api/controller/Store.php @@ -125,7 +125,11 @@ class Store extends Controller $file = UploadFile::where('file_id', '=', $info['logo_image_id'])->find(); $info['logo_image'] = $file->preview_url; } - + $info['login_img'] = ""; + if ($info['login_img_id']) { + $file = UploadFile::where('file_id', '=', $info['login_img_id'])->find(); + $info['login_img'] = $file->preview_url; + } return $this->renderSuccess($info); } diff --git a/app/common/model/Store.php b/app/common/model/Store.php index 2b3d19c2..152aef65 100644 --- a/app/common/model/Store.php +++ b/app/common/model/Store.php @@ -92,6 +92,12 @@ class Store extends BaseModel } else { $list['rankingImg'] = null; } + if ($list['login_img_id']) { + $files = UploadFile::getFileList([$list['login_img_id']]); + $list['loginImg'] = $files ? $files[0] : null; + } else { + $list['loginImg'] = null; + } } return $list ?? null; } catch (\Exception $e) {