测试环境不校验验证码

This commit is contained in:
luofei 2023-06-07 13:38:58 +08:00
parent a5f819d353
commit 5f75e53efb

View File

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