增加商户入驻商户类型验证
This commit is contained in:
parent
c6eebb4c1d
commit
76dada9dbf
@ -106,7 +106,20 @@ class MerchantIntention extends BaseController
|
|||||||
|
|
||||||
protected function checkParams()
|
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);
|
app()->make(MerchantIntentionValidate::class)->check($data);
|
||||||
$check = app()->make(SmsService::class)->checkSmsCode($data['phone'], $data['code'], 'intention');
|
$check = app()->make(SmsService::class)->checkSmsCode($data['phone'], $data['code'], 'intention');
|
||||||
$data['mer_type_id'] = (int)$data['mer_type_id'];
|
$data['mer_type_id'] = (int)$data['mer_type_id'];
|
||||||
|
@ -24,7 +24,7 @@ class MerchantIntentionValidate extends Validate
|
|||||||
'name|姓名' => 'require',
|
'name|姓名' => 'require',
|
||||||
'mer_name|姓名' => 'require|max:32',
|
'mer_name|姓名' => 'require|max:32',
|
||||||
'merchant_category_id|商户分类' => 'require',
|
'merchant_category_id|商户分类' => 'require',
|
||||||
'mer_type_id|店铺类型' => 'integer',
|
'mer_type_id|店铺类型' => 'require|integer',
|
||||||
'code|验证码' => 'require',
|
'code|验证码' => 'require',
|
||||||
'images|资质' => 'array',
|
'images|资质' => 'array',
|
||||||
];
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user