1
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user