getParams(); LoginValidate::check($params); $user = $service->login($params); return $this->success($user); } public function send_message_again(LoginService $service) { $params = $this->getParams(); LoginValidate::checkPhone($params); $user = $service->send_message_again($params); return $this->success($user); } public function check_code(LoginService $service) { $params = $this->getParams(); LoginValidate::checkCode($params); $user = $service->check_code($params); return $this->success($user); } public function loginOut(LoginService $service) { try{ $user = $service->logout($this->getToken()); return $this->success($user); } catch (Exception $exception){ $this->throwError('系统异常',0001); } } public function out(LoginService $service) { try{ $params = $this->getParams(); $data = $service->out($params['session']); return $this->success($data); } catch (Exception $exception){ $this->throwError('系统异常',0001); } } }