diff --git a/app/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index dcb9c582..c138d214 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -46,7 +46,7 @@ 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 && ($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(); @@ -136,7 +136,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 && ($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();