diff --git a/app/admin/controller/Index.php b/app/admin/controller/Index.php index 2e3af9c17..d900e97bf 100644 --- a/app/admin/controller/Index.php +++ b/app/admin/controller/Index.php @@ -55,7 +55,7 @@ class Index extends Controller /** * 修改用户资料 * @login true - * @param integer $id 用户ID + * @param mixed $id 用户ID * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException @@ -70,10 +70,21 @@ class Index extends Controller } } + /** + * 资料修改后处理 + * @param bool $status + */ + protected function _info_form_result(bool $status) + { + if ($status) { + $this->success('用户资料修改成功!', 'javascript:location.reload()'); + } + } + /** * 修改当前用户密码 * @login true - * @param integer $id + * @param mixed $id * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException diff --git a/app/admin/controller/Menu.php b/app/admin/controller/Menu.php index c110d406b..d0260bed1 100644 --- a/app/admin/controller/Menu.php +++ b/app/admin/controller/Menu.php @@ -137,17 +137,6 @@ class Menu extends Controller } } - /** - * 菜单编辑成功后刷新页面 - * @param bool $state - */ - protected function _form_result(bool $state) - { - if ($state) { - $this->success('系统菜单修改成功!', 'javascript:location.reload()'); - } - } - /** * 修改菜单状态 * @auth true @@ -182,6 +171,7 @@ class Menu extends Controller if ($result) { $id = $this->app->db->name($this->table)->getLastInsID(); sysoplog('系统菜单管理', "添加系统菜单[{$id}]成功"); + $this->success('系统菜单添加成功!', 'javascript:location.reload()'); } } @@ -194,6 +184,7 @@ class Menu extends Controller if ($result) { $id = input('id') ?: 0; sysoplog('系统菜单管理', "修改系统菜单[{$id}]成功"); + $this->success('系统菜单修改成功!', 'javascript:location.reload()'); } } @@ -206,6 +197,7 @@ class Menu extends Controller if ($result) { [$id, $state] = [input('id'), input('status')]; sysoplog('系统菜单管理', ($state ? '激活' : '禁用') . "系统菜单[{$id}]成功"); + $this->success('系统菜单修改成功!', 'javascript:location.reload()'); } } @@ -218,7 +210,7 @@ class Menu extends Controller if ($result) { $id = input('id') ?: 0; sysoplog('系统菜单管理', "删除系统菜单[{$id}]成功"); + $this->success('系统菜单删除成功!', 'javascript:location.reload()'); } } - } diff --git a/app/admin/controller/User.php b/app/admin/controller/User.php index 9e0bf839c..b3c14f09e 100644 --- a/app/admin/controller/User.php +++ b/app/admin/controller/User.php @@ -201,6 +201,7 @@ class User extends Controller if ($result) { $id = input('id') ?: 0; sysoplog('系统用户管理', "修改系统用户[{$id}]成功"); + $this->success('用户资料修改成功!', 'javascript:location.reload()'); } }