From 069d3db4c7af0140844969859e41eb140561b007 Mon Sep 17 00:00:00 2001 From: win7 Date: Wed, 25 Dec 2019 08:49:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=A6=E7=94=9F=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=99=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/renshi/controller/Student.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/renshi/controller/Student.php b/app/renshi/controller/Student.php index f1eb595a..bb3a0465 100644 --- a/app/renshi/controller/Student.php +++ b/app/renshi/controller/Student.php @@ -207,7 +207,7 @@ class Student extends BaseController $stu = new STU(); - $stuinof = $stu::withTrashed() + $stuinfo = $stu::withTrashed() ->where('shenfenzhenghao',$list['shenfenzhenghao']) ->where('id','<>',$id) ->with([ @@ -219,8 +219,8 @@ class Student extends BaseController ->find(); - if($stuinof){ - return json(['msg'=>'此身份证号与 '.$stuinof->stuSchool->jiancheng.':'.$stuinof->xingming.' 重复。','val'=>0]); + if($stuinfo){ + return json(['msg'=>'此身份证号与 '.$stuinfo->stuSchool->jiancheng.':'.$stuinfo->xingming.' 重复。','val'=>0]); } // 更新数据 @@ -433,6 +433,7 @@ class Student extends BaseController // 删除标题行 array_splice($stuinfo,0,3); + $stuinfo = array_filter($stuinfo,function($q){ return $q[1] != null && $q[2] != null && $q[3] != null; });