diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index ba13ab3e..ec67644d 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -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(); diff --git a/app/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index 42cb1bcb..9fe1eb51 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -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('商户名称已存在,不可申请');