From 76dada9dbfdf5c4418ab9a1c20ba941be4f8fd66 Mon Sep 17 00:00:00 2001 From: monanxiao Date: Sat, 18 Mar 2023 09:26:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=95=86=E6=88=B7=E5=85=A5?= =?UTF-8?q?=E9=A9=BB=E5=95=86=E6=88=B7=E7=B1=BB=E5=9E=8B=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/store/merchant/MerchantIntention.php | 15 ++++++++++++++- app/validate/api/MerchantIntentionValidate.php | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index e81b065b..b010941c 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -106,7 +106,20 @@ class MerchantIntention extends BaseController protected function checkParams() { - $data = $this->request->params(['phone', 'mer_name', 'name', 'code', 'images', 'merchant_category_id', 'mer_type_id','area_id','street_id','village_id','is_nmsc']); + $data = $this->request->params([ + 'phone', + 'mer_name', + 'name', + 'code', + 'images', + 'merchant_category_id', + 'mer_type_id', + 'area_id', + 'street_id', + 'village_id', + 'is_nmsc' + ]); + 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']; diff --git a/app/validate/api/MerchantIntentionValidate.php b/app/validate/api/MerchantIntentionValidate.php index e3d1e81d..eddcc03d 100644 --- a/app/validate/api/MerchantIntentionValidate.php +++ b/app/validate/api/MerchantIntentionValidate.php @@ -24,7 +24,7 @@ class MerchantIntentionValidate extends Validate 'name|姓名' => 'require', 'mer_name|姓名' => 'require|max:32', 'merchant_category_id|商户分类' => 'require', - 'mer_type_id|店铺类型' => 'integer', + 'mer_type_id|店铺类型' => 'require|integer', 'code|验证码' => 'require', 'images|资质' => 'array', ];