This commit is contained in:
2025-12-12 14:16:48 +08:00
parent 6a5bda44e6
commit 3813974eae
8 changed files with 78 additions and 43 deletions

View File

@@ -445,11 +445,12 @@ autoShowBusinessError:YES
// code token error
BOOL handledByAuth = [self kb_handleBizCode:bizCode json:dict response:response];
NSString *msg = KBBizMessageFromJSONObject(dict) ?: KBLocalized(@"Server error");
if (autoShowBusinessError) {
dispatch_async(dispatch_get_main_queue(), ^{
[KBHUD dismiss];
[KBHUD showInfo:msg];
});
if (handledByAuth == false) {
if (autoShowBusinessError) {
dispatch_async(dispatch_get_main_queue(), ^{
[KBHUD showInfo:msg];
});
}
}
NSError *bizErr = [NSError errorWithDomain:KBNetworkErrorDomain
code:KBNetworkErrorBusiness
@@ -457,7 +458,7 @@ autoShowBusinessError:YES
NSLocalizedDescriptionKey : msg,
@"code" : @(bizCode)
}];
if (completion) completion(dict, response, bizErr);
// if (completion) completion(dict, response, bizErr);
return;
}
// code
@@ -536,6 +537,7 @@ autoShowBusinessError:YES
dispatch_async(dispatch_get_main_queue(), ^{
// Keychain +
[[KBUserSessionManager shared] logout];
[[KBUserSessionManager shared] goLoginVC];
//
[KBHUD showInfo:msg];
// 广便 UI