取消商户分类必填
This commit is contained in:
parent
7702f30dac
commit
0b6d5e236f
@ -146,8 +146,8 @@ class Merchant extends BaseController
|
||||
return app('json')->fail('商户名已存在');
|
||||
if ($data['mer_phone'] && isPhone($data['mer_phone']))
|
||||
return app('json')->fail('请输入正确的手机号');
|
||||
if (!$data['category_id'] || !$merchantCategoryRepository->exists($data['category_id']))
|
||||
return app('json')->fail('商户分类不存在');
|
||||
// if (!$data['category_id'] || !$merchantCategoryRepository->exists($data['category_id']))
|
||||
// return app('json')->fail('商户分类不存在');
|
||||
|
||||
$newUid = Db::name('User')->where('account', $data['mer_phone'])->value('uid', -1);
|
||||
$merId = Db::name('Merchant')->where('uid', $newUid)->value('mer_id', 0);
|
||||
|
@ -33,7 +33,7 @@ class MerchantValidate extends Validate
|
||||
* @var array
|
||||
*/
|
||||
protected $rule = [
|
||||
'category_id|商户分类' => 'require',
|
||||
'category_id|商户分类' => '',
|
||||
'type_id|店铺类型' => 'integer',
|
||||
'mer_name|商户名称' => 'require|max:32',
|
||||
'mer_account|商户账号' => 'require|alphaNum|min:4|max:16',
|
||||
|
Loading…
x
Reference in New Issue
Block a user