mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update Index.php
This commit is contained in:
parent
eff50374f1
commit
a96d4aa818
@ -37,13 +37,12 @@ class Index extends Controller
|
|||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
/*! 根据运行模式刷新权限 */
|
/*! 根据运行模式刷新权限 */
|
||||||
$clear = $this->app->isDebug();
|
AdminService::instance()->apply($this->app->isDebug());
|
||||||
AdminService::instance()->apply($clear);
|
|
||||||
/*! 读取当前权限菜单树 */
|
/*! 读取当前权限菜单树 */
|
||||||
$this->menus = MenuService::instance()->getTree();
|
$this->menus = MenuService::instance()->getTree();
|
||||||
/*! 判断用户是否已经登录 */
|
/*! 判断用户是否已经登录 */
|
||||||
$this->login = AdminService::instance()->isLogin();
|
$this->login = AdminService::instance()->isLogin();
|
||||||
/*! 菜单为空并且未登录跳转到登录页 */
|
/*! 菜单为空且未登录跳转到登录页 */
|
||||||
if (empty($this->menus) && empty($this->login)) {
|
if (empty($this->menus) && empty($this->login)) {
|
||||||
$this->redirect(sysuri('admin/login/index'));
|
$this->redirect(sysuri('admin/login/index'));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user