This commit is contained in:
2025-12-04 19:44:54 +08:00
parent 7a25a6a5fa
commit 515487e748
2 changed files with 8 additions and 8 deletions

View File

@@ -30,19 +30,19 @@
[[KBNetworkManager shared] GET:KB_API_CHARACTER_LIST
parameters:params
headers:nil
autoShowBusinessError:NO
autoShowBusinessError:true
completion:^(NSDictionary * _Nullable json, NSURLResponse * _Nullable response, NSError * _Nullable error) {
if (needShow) {
[KBHUD dismiss];
// [KBHUD dismiss];
}
if (error) {
// message
NSString *msg = KBBizMessageFromJSONObject(json) ?: error.localizedDescription ?: KBLocalized(@"Network error");
[KBHUD showInfo:msg];
if (completion) {
completion(nil, error);
}
// NSString *msg = KBBizMessageFromJSONObject(json) ?: error.localizedDescription ?: KBLocalized(@"Network error");
// [KBHUD showInfo:msg];
// if (completion) {
// completion(nil, error);
// }
return;
}

View File

@@ -397,7 +397,7 @@ autoShowBusinessError:YES
// code token error
BOOL handledByAuth = [self kb_handleBizCode:bizCode json:dict response:response];
NSString *msg = KBBizMessageFromJSONObject(dict) ?: KBLocalized(@"Server error");
if (autoShowBusinessError && !handledByAuth) {
if (autoShowBusinessError) {
dispatch_async(dispatch_get_main_queue(), ^{
[KBHUD showInfo:msg];
});