This commit is contained in:
启星
2025-12-22 10:16:05 +08:00
parent ba4fd658a9
commit 0fcff85625
205 changed files with 26298 additions and 13203 deletions

View File

@@ -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);
}];