1
0
mirror of https://gitee.com/zoujingli/ThinkAdmin.git synced 2025-04-06 03:58:04 +08:00

增加节点强刷

This commit is contained in:
Anyon 2019-12-02 16:45:36 +08:00
parent ec1f94baa2
commit 49b3b95990
2 changed files with 3 additions and 0 deletions
app/admin/controller

@ -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') {

@ -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();
// 选择自己的上级菜单