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('店铺类型不存在');