params['ptStyle'] = 6; $staffId = jwt::getLoginId(); if (empty($staffId)) { $this->validate = false; } //游客可以访问的方法 if (in_array($action->id, $this->guestAccess)) { $this->validate = true; } else { $staff = StaffService::getById($staffId, true); if (empty($staff)) { util::logout(); } if ($staff->status == 0) { util::logout("账号已冻结"); } $this->staff = $staff; } if ($this->validate == false) { util::notLogin(); } $this->staffId = $staffId; return parent::beforeAction($action); } }