public Response<LoginResult> Login(LoginRequest loginRequest) { JObject request = JObject.FromObject(loginRequest); var result = Method(Functions.Login, request, ParameterValidator.LoginCheckRequest); //调用 Login 登录方法 try { var loginResponse = JsonConvert.DeserializeObject<Response<LoginResult>>(result.ToString()); if (loginResponse.Success) Token = loginResponse.Result.Token; return loginResponse; } catch (Exception e) { return Response<LoginResult>.BuildResponse(e); } }
public IAsyncResult BeginLogin(LoginRequest loginRequest) { JObject request = JObject.FromObject(loginRequest); return BeginMethod(Functions.Login, request, ParameterValidator.LoginCheckRequest, LoginCallBackMethod); }