From ffdda769e23a8e2f53bb88b5bd9667e2b08faeb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=97=AF=7E?= Date: Wed, 28 Apr 2021 08:44:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=A6=E7=94=9F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AF=86=E7=A0=81=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/studentSearchChengji/controller/Index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/studentSearchChengji/controller/Index.php b/app/studentSearchChengji/controller/Index.php index 9e8256b1..8838c90e 100755 --- a/app/studentSearchChengji/controller/Index.php +++ b/app/studentSearchChengji/controller/Index.php @@ -108,7 +108,7 @@ class Index extends StudentSearchBase // 获取用户名 $stu = new \app\student\model\Student; - $serpassword = $stu::where('id', $id)->value('password'); + $serpassword = $stu::where('id', $student_id)->value('password'); // 实例化加密类 $md5 = new APR1_MD5(); @@ -123,7 +123,7 @@ class Index extends StudentSearchBase // 更新密码 $password = $md5->hash($list['newpassword']); - $data = $stu::update(['id' => $id, 'password' => $password]); + $data = $stu::update(['id' => $student_id, 'password' => $password]); // 根据更新结果设置返回提示信息 $data ? $data = ['msg' => '修改成功', 'val' => 1]