post()->goCheck(); $result = LoginLogic::register($params); if (true === $result) { return $this->success('注册成功', [], 1, 1); } return $this->fail(LoginLogic::getError()); } // 登录 public function login(): Json { $params = (new LoginAccountValidate())->post()->goCheck(); $result = LoginLogic::loginJwt($params); if (false === $result) { return $this->fail(LoginLogic::getError()); } return $this->data($result); } // 退出 public function logout(): Json { $result = LoginLogic::logout($this->userInfo); if($result){ return $this->success('成功'); }else{ return $this->fail('失败'); } } // 验证token public function verify(): Json { $params = (new TokenValidate())->post()->goCheck('JwtToken'); $result = LoginLogic::verifyJwtToken($params); if (false === $result) { return $this->fail(LoginLogic::getError()); } return $this->data($result); } }