mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-07 18:42:49 +08:00
完成自动缓存功能集成;
This commit is contained in:
@@ -34,6 +34,7 @@ class Index extends AdminController
|
||||
$quicks = SystemQuick::field('id,title,icon,href')
|
||||
->where(['status' => 1])
|
||||
->order('sort', 'desc')
|
||||
->autoCache('welcome_list')
|
||||
->limit(8)
|
||||
->select();
|
||||
$this->assign('quicks', $quicks);
|
||||
|
||||
@@ -20,6 +20,13 @@ class SystemAdmin extends TimeModel
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
public static $autoCache = [
|
||||
[
|
||||
'name' => 'info',
|
||||
'field' => 'id'
|
||||
]
|
||||
];
|
||||
|
||||
public function getAuthList()
|
||||
{
|
||||
$list = (new SystemAuth())
|
||||
@@ -27,5 +34,4 @@ class SystemAdmin extends TimeModel
|
||||
->column('title', 'id');
|
||||
return $list;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,4 @@ class SystemNode extends TimeModel
|
||||
}
|
||||
return $newList;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,4 +20,9 @@ class SystemQuick extends TimeModel
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
}
|
||||
public static $autoCache = [
|
||||
[
|
||||
'name' => 'welcome_list'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user