From 10f3f8609daf283e4bc14dec802047c37976b787 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Wed, 15 Jan 2020 10:35:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=8F=B7=E5=8E=BB=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/SafeController.class.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php index 930fd5843..55daaae66 100644 --- a/Application/Home/Controller/SafeController.class.php +++ b/Application/Home/Controller/SafeController.class.php @@ -207,6 +207,11 @@ class SafeController extends BaseController{ $this->error("手机号码格式不合法"); return false; } + $telInfo = M('promote','tab_')->field('id')->where(['mobile_phone'=>$tel])->find(); + if(!empty($telInfo)) { + $this->error("手机号码已存在"); + return false; + } if(empty($id_card)) { $this->error("身份证号码不能为空"); return false; @@ -344,12 +349,6 @@ class SafeController extends BaseController{ $id = get_pid(); $rs = M("promote","tab_")->field('anothpic,ver_status,real_name,bank_card,mobile_phone,email,address,idcard')->where(['id'=>$id])->find(); $anothpic = $rs['anothpic']; - /* if(!empty($anothpic)) { - $idcarpicArr = explode(',', $anothpic); - foreach ($idcarpicArr as $key => $value) { - $promoteInfo['valuedata'][$key] = $value; - } - } */ $promoteInfo = ""; $address = json_decode($rs['address'],false)[1]; $realname = mb_strlen($rs['real_name'],'utf-8') == 2 ? mb_substr($rs['real_name'],0,1,'utf-8').'*':mb_substr($rs['real_name'],0,1,'utf-8').'**'; @@ -380,6 +379,11 @@ class SafeController extends BaseController{ $this->error("手机号码格式不合法"); return false; } + $telInfo = M('promote','tab_')->field('id')->where(['mobile_phone'=>$tel])->find(); + if(!empty($telInfo)) { + $this->error("手机号码已存在"); + return false; + } if(empty($address1)) { $this->error("地址不能为空");