更新申请商家入驻

This commit is contained in:
yaooo 2023-08-22 09:55:37 +08:00
parent 1047347491
commit b2523aaab6
2 changed files with 4 additions and 2 deletions

View File

@ -203,8 +203,8 @@ class Auth extends BaseController
$data['is_wsxx'] = 0;
$data['mer_info'] = [];
// 判断是否是商户,并且有没有完善信息
//这里有点小问题以后要修改
// 判断是否是商户,并且有没有完善信息
// 这里有点小问题以后要修改
$store_service = Db::name('store_service')->where('uid', $data['uid'])->find();
if ($store_service) {
$mer_arr = Db::name('merchant')->where('mer_id', $store_service['mer_id'])->where('is_del', 0)->where('status', 1)->field('type_id,mer_avatar,mer_banner,mer_info,category_id,service_phone,mer_address,uid,mer_name')->find();

View File

@ -44,6 +44,8 @@ class MerchantIntention extends BaseController
return app('json')->fail('未开启商户入驻');
}
if ($this->userInfo) $data['uid'] = $this->userInfo->uid;
if ($this->userInfo->account == $data['phone'])
throw new ValidateException('手机号账户已存在,不可申请');
$make = app()->make(MerchantRepository::class);
if ($make->fieldExists('mer_name', $data['mer_name']))
throw new ValidateException('商户名称已存在,不可申请');