提交
This commit is contained in:
@@ -271,7 +271,7 @@ static NSInteger HTTP_ERROR_CODE = 0;
|
||||
return [manager GET:urlString parameters:parameters headers:headers progress:^(NSProgress * _Nonnull downloadProgress) {
|
||||
|
||||
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
||||
|
||||
[QXLogger network:@"网络请求" url:urlString params:parameters response:responseObject error:nil];
|
||||
NSDictionary *dict = [self getResponseDictWith:responseObject urlString:urlString];
|
||||
int code = [dict[@"code"] intValue];
|
||||
if (code == HTTP_LOGINLOSE_CODE) {
|
||||
@@ -301,7 +301,7 @@ static NSInteger HTTP_ERROR_CODE = 0;
|
||||
if (fail){
|
||||
fail(error,error.description,task);
|
||||
};
|
||||
|
||||
[QXLogger network:@"网络请求" url:urlString params:parameters response:nil error:error];
|
||||
NSHTTPURLResponse * responses = (NSHTTPURLResponse *)task.response;
|
||||
NSLog(@"失败返回 --- URL : %@ \n ---错误码 = %ld \n ---详细信息 : %@",urlString,(long)responses.statusCode,error);
|
||||
}];
|
||||
@@ -333,6 +333,7 @@ static NSInteger HTTP_ERROR_CODE = 0;
|
||||
} progress:^(NSProgress * _Nonnull uploadProgress) {
|
||||
|
||||
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
||||
[QXLogger network:@"网络请求" url:urlString params:parameters response:responseObject error:nil];
|
||||
NSDictionary *dict = [self getResponseDictWith:responseObject urlString:urlString];
|
||||
int code = [dict[@"code"] intValue];
|
||||
if (code == HTTP_LOGINLOSE_CODE) {
|
||||
@@ -361,7 +362,7 @@ static NSInteger HTTP_ERROR_CODE = 0;
|
||||
if (fail){
|
||||
fail(error,error.localizedDescription,task);
|
||||
};
|
||||
|
||||
[QXLogger network:@"网络请求" url:urlString params:parameters response:nil error:error];
|
||||
NSHTTPURLResponse * responses = (NSHTTPURLResponse *)task.response;
|
||||
NSLog(@"失败返回 --- URL : %@ \n ---错误码 = %ld \n ---详细信息 : %@",urlString,(long)responses.statusCode,error);
|
||||
}];
|
||||
|
||||
Reference in New Issue
Block a user