Update Index.php

This commit is contained in:
Anyon 2020-10-26 14:34:41 +08:00
parent eff50374f1
commit a96d4aa818

View File

@ -37,13 +37,12 @@ class Index extends Controller
public function index()
{
/*! 根据运行模式刷新权限 */
$clear = $this->app->isDebug();
AdminService::instance()->apply($clear);
AdminService::instance()->apply($this->app->isDebug());
/*! 读取当前权限菜单树 */
$this->menus = MenuService::instance()->getTree();
/*! 判断用户是否已经登录 */
$this->login = AdminService::instance()->isLogin();
/*! 菜单为空且未登录跳转到登录页 */
/*! 菜单为空且未登录跳转到登录页 */
if (empty($this->menus) && empty($this->login)) {
$this->redirect(sysuri('admin/login/index'));
} else {