From 5f75e53efbf4da6220836c70fdcc7c6fb4130339 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Wed, 7 Jun 2023 13:38:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=8E=AF=E5=A2=83=E4=B8=8D?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E9=AA=8C=E8=AF=81=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/store/merchant/MerchantIntention.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index 60d0699a..9dd7cab6 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -123,7 +123,9 @@ class MerchantIntention extends BaseController app()->make(MerchantIntentionValidate::class)->check($data); $check = app()->make(SmsService::class)->checkSmsCode($data['phone'], $data['code'], 'intention'); $data['mer_type_id'] = (int)$data['mer_type_id']; - if (!$check) throw new ValidateException('验证码不正确'); + if (!env('APP_DEBUG')) { + if (!$check) throw new ValidateException('验证码不正确'); + } if (!app()->make(MerchantCategoryRepository::class)->get($data['merchant_category_id'])) throw new ValidateException('商户分类不存在'); if ($data['mer_type_id'] && !app()->make(MerchantTypeRepository::class)->exists($data['mer_type_id'])) throw new ValidateException('店铺类型不存在');