From 1252dafa8af0a64f6f0d66d4d4991783d725f7e5 Mon Sep 17 00:00:00 2001 From: Anyon Date: Thu, 28 Nov 2019 17:49:07 +0800 Subject: [PATCH] Update Index.php --- app/admin/controller/Index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/admin/controller/Index.php b/app/admin/controller/Index.php index 5b04b4703..933f7f6e0 100644 --- a/app/admin/controller/Index.php +++ b/app/admin/controller/Index.php @@ -38,9 +38,9 @@ class Index extends Controller public function index() { $this->title = '系统管理后台'; - $auth = AdminService::instance()->apply(true); + $login = AdminService::instance()->apply(true)->isLogin(); $this->menus = MenuService::instance()->getTree(); - if (empty($this->menus) && !$auth->isLogin()) { + if (empty($this->menus) && empty($login)) { $this->redirect(url('@admin/login')); } else { $this->fetch();