diff --git a/app/admin/controller/Menu.php b/app/admin/controller/Menu.php index 8ad1ebcd1..dd5d66504 100644 --- a/app/admin/controller/Menu.php +++ b/app/admin/controller/Menu.php @@ -159,4 +159,52 @@ class Menu extends Controller $this->_delete($this->table); } + /** + * 表单结果处理 + * @param bool $result + */ + protected function _add_form_result(bool $result) + { + if ($result) { + $id = $this->app->db->name($this->table)->getLastInsID(); + sysoplog('系统菜单管理', "添加系统菜单[{$id}]成功"); + } + } + + /** + * 表单结果处理 + * @param boolean $result + */ + protected function _edit_form_result(bool $result) + { + if ($result) { + $id = input('id') ?: 0; + sysoplog('系统菜单管理', "修改系统菜单[{$id}]成功"); + } + } + + /** + * 状态结果处理 + * @param boolean $result + */ + protected function _state_save_result(bool $result) + { + if ($result) { + [$id, $state] = [input('id'), input('status')]; + sysoplog('系统菜单管理', ($state ? '激活' : '禁用') . "系统菜单[{$id}]成功"); + } + } + + /** + * 删除结果处理 + * @param boolean $result + */ + protected function _remove_delete_result(bool $result) + { + if ($result) { + $id = input('id') ?: 0; + sysoplog('系统菜单管理', "删除系统菜单[{$id}]成功"); + } + } + }