From 49b3b959904e2eb69fe1310ce34b48d81837d540 Mon Sep 17 00:00:00 2001 From: Anyon Date: Mon, 2 Dec 2019 16:45:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8A=82=E7=82=B9=E5=BC=BA?= =?UTF-8?q?=E5=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Auth.php | 1 + app/admin/controller/Menu.php | 2 ++ 2 files changed, 3 insertions(+) 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(); // 选择自己的上级菜单