diff --git a/app/admin/controller/Auth.php b/app/admin/controller/Auth.php index 5f1f2f3c7..ed580c5b1 100644 --- a/app/admin/controller/Auth.php +++ b/app/admin/controller/Auth.php @@ -98,6 +98,7 @@ class Auth extends Controller $map = ['auth' => input('id', '0')]; $action = strtolower(input('action', '')); if ($action === 'get') { + $this->app->cache->delete('system_auth_node'); $checkeds = $this->app->db->name('SystemAuthNode')->where($map)->column('node'); $this->success('获取权限节点成功!', AdminService::instance()->getTree($checkeds)); } elseif ($action === 'save') { diff --git a/app/admin/controller/Menu.php b/app/admin/controller/Menu.php index 5beadf899..fef5e8b62 100644 --- a/app/admin/controller/Menu.php +++ b/app/admin/controller/Menu.php @@ -96,6 +96,8 @@ class Menu extends Controller protected function _form_filter(&$vo) { if ($this->request->isGet()) { + // 清理权限节点 + $this->app->cache->delete('system_auth_node'); // 读取系统功能节点 $this->nodes = MenuService::instance()->getList(); // 选择自己的上级菜单