1
This commit is contained in:
@@ -15,6 +15,12 @@
|
||||
@property (nonatomic, strong) KBMyVM *myVM;
|
||||
@end
|
||||
|
||||
@implementation KBAppUpdateInfo
|
||||
@end
|
||||
|
||||
@implementation KBAppUpdateResponse
|
||||
@end
|
||||
|
||||
@implementation KBLoginVM
|
||||
|
||||
+ (instancetype)shared {
|
||||
@@ -169,7 +175,10 @@
|
||||
NSDictionary *params = [self kb_appUpdateParams];
|
||||
[[KBNetworkManager shared] POST:API_APP_CHECK_UPDATE jsonBody:params headers:nil autoShowBusinessError:NO completion:^(NSDictionary * _Nullable jsonOrData, NSURLResponse * _Nullable response, NSError * _Nullable error) {
|
||||
if (error) { if (completion) completion(nil, error); return; }
|
||||
if (completion) completion(jsonOrData, nil);
|
||||
if (![jsonOrData isKindOfClass:NSDictionary.class]) { if (completion) completion(nil, nil); return; }
|
||||
KBAppUpdateResponse *resp = [KBAppUpdateResponse mj_objectWithKeyValues:jsonOrData];
|
||||
if (resp.code != 0) { if (completion) completion(nil, nil); return; }
|
||||
if (completion) completion(resp.data, nil);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user