From 08717312cf5b3d9da256770f4cfe69a1b2df68e8 Mon Sep 17 00:00:00 2001 From: win10 Date: Thu, 10 Sep 2020 14:06:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=99=E5=B8=88=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/teacher/controller/Index.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/teacher/controller/Index.php b/app/teacher/controller/Index.php index 6100a0f4..59528448 100644 --- a/app/teacher/controller/Index.php +++ b/app/teacher/controller/Index.php @@ -289,10 +289,13 @@ class Index extends AdminBase return json(['msg' => $msg, 'val' => 0]);; } $tc = new TC(); - $temp = $tc->phoneSrc($list['phone']); + $temp = TC::withTrashed()->where('phone', $list['phone'])->find(); if($temp) { - return json(['msg' => '手机号已经存在', 'val' => 0]); + if($temp->id != $id*1) + { + return json(['msg' => '手机号已经存在', 'val' => 0]); + } } $list['quanpin'] = trim(strtolower(str_replace(' ', '', $list['quanpin'])));