Browse Source

Update Index.php

Anyon 4 years ago
parent
commit
a96d4aa818
1 changed files with 2 additions and 3 deletions
  1. 2 3
      app/admin/controller/Index.php

+ 2 - 3
app/admin/controller/Index.php

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