From b2523aaab69aabf56ddc8cc10ef75a16438f8ffc Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Tue, 22 Aug 2023 09:55:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=94=B3=E8=AF=B7=E5=95=86?= =?UTF-8?q?=E5=AE=B6=E5=85=A5=E9=A9=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Auth.php | 4 ++-- app/controller/api/store/merchant/MerchantIntention.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) 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('商户名称已存在,不可申请');