From ed9be86912383810161d8ceff771efc2dd886cf6 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 28 Sep 2023 14:19:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=90=A5=E4=B8=9A=E6=89=A7?= =?UTF-8?q?=E7=85=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Auth.php | 7 ++++++- app/controller/api/store/merchant/Merchant.php | 5 ----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index e09b6d05..c6179502 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -1464,7 +1464,12 @@ class Auth extends BaseController if ($status == 1) { $repository->updateStatus($id, $data); $intention = Db::name('merchant_intention')->where('mer_intention_id', $id)->where('type', 1)->find(); - Db::name('merchant')->where('mer_id', $intention['mer_id'] ?? 0)->update(['mer_license_image' => $intention['images']]); + $merLicenseImage = ''; + if (!empty($intention['images'])) { + $merLicenseImageArray = explode(',', $intention['images']); + $merLicenseImage = $merLicenseImageArray[0] ?? ''; + } + Db::name('merchant')->where('mer_id', $intention['mer_id'] ?? 0)->update(['mer_license_image' => $merLicenseImage]); } } else { //商户交易申请 diff --git a/app/controller/api/store/merchant/Merchant.php b/app/controller/api/store/merchant/Merchant.php index 06b41335..05989af8 100644 --- a/app/controller/api/store/merchant/Merchant.php +++ b/app/controller/api/store/merchant/Merchant.php @@ -251,11 +251,6 @@ class Merchant extends BaseController $data = array_merge($data,$delivery); $data['sys_bases_status'] = systemConfig('sys_bases_status') === '0' ? 0 : 1; $data['type_code'] = Db::name('MerchantType')->where('mer_type_id', $data['type_id'])->value('type_code'); - if (!empty($data['mer_license_image'])) { - $data['mer_license_image'] = explode(',', $data['mer_license_image']); - } else { - $data['mer_license_image'] = []; - } return app('json')->success($data); }