From 1e7aff152761d504410aa4bd32ed25ce06b0550a Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 14 Sep 2023 16:51:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=95=86=E6=88=B7=E5=85=A5?= =?UTF-8?q?=E9=A9=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/store/merchant/MerchantIntention.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index c138d214..7dc1d59f 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -46,9 +46,10 @@ class MerchantIntention extends BaseController return app('json')->fail('未开启商户入驻'); } if ($this->userInfo) $data['uid'] = $this->userInfo->uid; - if ($this->userInfo->phone && ($this->userInfo->phone != ($data['phone'] ?? ''))) { + if (($this->userInfo->phone ?? false) && ($this->userInfo->phone != ($data['phone'] ?? ''))) { throw new ValidateException('联系电话和注册手机不一致'); } + $intentionInfo = Db::name('merchant_intention')->where('social_credit_code', $data['social_credit_code'])->where('status', '<>', 2)->find(); if ($intentionInfo) { throw new ValidateException('此统一社会信用代码已申请商户'); @@ -136,7 +137,7 @@ class MerchantIntention extends BaseController if (!systemConfig('mer_intention_open')) { return app('json')->fail('未开启商户入驻'); } - if ($this->userInfo->phone && ($this->userInfo->phone != ($data['phone'] ?? ''))) { + if (($this->userInfo->phone ?? false) && ($this->userInfo->phone != ($data['phone'] ?? ''))) { throw new ValidateException('联系电话和注册手机不一致'); } $intentionInfo = Db::name('merchant_intention')->where('social_credit_code', $data['social_credit_code'])->where('status', '<>', 2)->find();