tjproject / TiCheck_Cilent

多平台整合的低价机票订阅应用
7 stars 6 forks source link

[登录] 服务器请求出错 #23

Open Yougmark opened 10 years ago

Yougmark commented 10 years ago
- (NSDictionary *)loginVerifyWithEmail:(NSString *)email password:(NSString *)password
{
    NSDictionary *loginInfo = [NSDictionary dictionaryWithObjectsAndKeys:email, @"Email", password, @"Password", nil];
    NSData *loginInfoJsonData = [NSJSONSerialization dataWithJSONObject:loginInfo options:NSJSONWritingPrettyPrinted error:nil];
    NSString *requestString = [NSString stringWithFormat:@"User=%@", [[NSString alloc] initWithData:loginInfoJsonData encoding:NSUTF8StringEncoding]];
    NSData *jsonBody = [requestString dataUsingEncoding:NSUTF8StringEncoding];

    NSData *responseData = [ServerRequest getServerUserResponseWithServerURL:SERVER_URL requestType:User_Login jsonData:jsonBody];

    return [self responseDataToJSONDictionary:responseData];
}
    NSData *responseData = [ServerRequest getServerUserResponseWithServerURL:SERVER_URL requestType:User_Login jsonData:jsonBody];

等待时间过长,数据返回为空

检查:

  1. 数据库数据正常,用户数据已存储
  2. 换一个用户仍然请求超时
  3. 偶尔发生

TODO:

  1. 前端加请求超时的处理
  2. 后台检查
Yougmark commented 10 years ago

已解决,估计是这几天伟大的dang封了几台DNS,无法访问官网了

Yougmark commented 10 years ago

但是网络问题还是需要前端处理得友好一点