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); }