auth->userId); $data = $user->append(['authorities', 'roles'])->toArray(); return $this->writeSuccess('', $data); } /** * 退出登录 * @return Json */ public function logout(): Json { $srv = new LoginService(); $srv->logout($this->request, $this->auth->getUser()); return $this->writeSuccess('退出成功'); } }