修改hud
This commit is contained in:
@@ -14,8 +14,9 @@
|
|||||||
- (void)applePayReqWithParams:(NSDictionary *)params
|
- (void)applePayReqWithParams:(NSDictionary *)params
|
||||||
needShow:(BOOL)needShow
|
needShow:(BOOL)needShow
|
||||||
completion:(KBPayCompletion)completion {
|
completion:(KBPayCompletion)completion {
|
||||||
// if (needShow) { [KBHUD show]; }
|
if (needShow) {
|
||||||
[KBHUD showWithStatus:@"Please wait"];
|
[KBHUD showWithStatus:@"Please wait"];
|
||||||
|
}
|
||||||
[[KBNetworkManager shared] POST:API_VALIDATE_RECEIPT
|
[[KBNetworkManager shared] POST:API_VALIDATE_RECEIPT
|
||||||
jsonBody:params
|
jsonBody:params
|
||||||
headers:nil
|
headers:nil
|
||||||
@@ -31,11 +32,15 @@
|
|||||||
NSNumber *codeNum = error.userInfo[@"code"];
|
NSNumber *codeNum = error.userInfo[@"code"];
|
||||||
NSInteger bizCode = codeNum.integerValue; // 这里就是底层附带的业务 code
|
NSInteger bizCode = codeNum.integerValue; // 这里就是底层附带的业务 code
|
||||||
// 根据 bizCode 做处理,比如透传给上层 completion
|
// 根据 bizCode 做处理,比如透传给上层 completion
|
||||||
if (completion) completion(bizCode, error.localizedDescription ?: KBLocalized(@"Network error"));
|
NSString *msg = error.localizedDescription ?: KBLocalized(@"Network error");
|
||||||
|
if (needShow) { [KBHUD showError:msg]; }
|
||||||
|
if (completion) completion(bizCode, msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (completion) completion(ERROR_CODE, error.localizedDescription ?: KBLocalized(@"Network error"));
|
NSString *msg = error.localizedDescription ?: KBLocalized(@"Network error");
|
||||||
|
if (needShow) { [KBHUD showError:msg]; }
|
||||||
|
if (completion) completion(KBBizCodeSystemError, msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -296,6 +296,7 @@ typedef NS_ENUM(NSInteger, KBSkinDetailSection) {
|
|||||||
fromViewController:self
|
fromViewController:self
|
||||||
mode:KBSkinSourceModeRemoteZip
|
mode:KBSkinSourceModeRemoteZip
|
||||||
completion:^(BOOL success) {
|
completion:^(BOOL success) {
|
||||||
|
[KBHUD dismiss];
|
||||||
NSLog(@"%@[SkinDetail] download result id=%@",
|
NSLog(@"%@[SkinDetail] download result id=%@",
|
||||||
(success ? @"✅" : @"❌"),
|
(success ? @"✅" : @"❌"),
|
||||||
self.detailModel.themeId);
|
self.detailModel.themeId);
|
||||||
|
|||||||
Reference in New Issue
Block a user