From fc413823551d7872c80c64b99c4f25c8e3494007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Mon, 30 Dec 2024 21:37:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7=E8=B5=84?= =?UTF-8?q?=E6=96=99=E7=BC=96=E8=BE=91=E5=8F=8A=E7=B3=BB=E7=BB=9F=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=8E=88=E6=9D=83=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Index.php | 12 +++++------- app/admin/view/config/index.html | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/admin/controller/Index.php b/app/admin/controller/Index.php index f5127894b..9d61938b1 100644 --- a/app/admin/controller/Index.php +++ b/app/admin/controller/Index.php @@ -79,12 +79,11 @@ class Index extends Controller /** * 修改用户资料 * @login true - * @param mixed $id 用户ID */ - public function info($id = 0) + public function info() { - $this->_applyFormToken(); - if (AdminService::getUserId() === intval($id)) { + $id = $this->request->param('id'); + if (AdminService::getUserId() == intval($id)) { SystemUser::mForm('user/form', 'id', [], ['id' => $id]); } else { $this->error('只能修改自己的资料!'); @@ -116,14 +115,13 @@ class Index extends Controller /** * 修改当前用户密码 * @login true - * @param mixed $id * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ - public function pass($id = 0) + public function pass() { - $this->_applyFormToken(); + $id = $this->request->param('id'); if (AdminService::getUserId() !== intval($id)) { $this->error('禁止修改他人密码!'); } diff --git a/app/admin/view/config/index.html b/app/admin/view/config/index.html index aaa6f720b..3b543f34e 100644 --- a/app/admin/view/config/index.html +++ b/app/admin/view/config/index.html @@ -1,7 +1,7 @@ {extend name="main"} {block name="button"} - + {:lang('清理无效配置')}