示例#1
0
文件: Login.cs 项目: jovijovi/kort
 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);
     }
 }
示例#2
0
文件: Login.cs 项目: jovijovi/kort
 public IAsyncResult BeginLogin(LoginRequest loginRequest)
 {
     JObject request = JObject.FromObject(loginRequest);
     return BeginMethod(Functions.Login, request, ParameterValidator.LoginCheckRequest, LoginCallBackMethod);
 }