controller->id; $actionName = $action->id; $this->menuList = PlatMenuService::getMenu($controllerName); $this->subMenuList = PlatMenuService::getSubMenu($controllerName, $actionName); $this->isLogin = xhWxOpenAdminService::isLogin(); if (!in_array($action->id, $this->guestAccess) && $this->isLogin == false) { $this->redirect(['main/login']); Yii::$app->end(); } if ($this->isLogin) { $adminId = xhWxOpenAdminService::getId(); $this->adminId = $adminId; } return parent::beforeAction($action); } }