修改hud

This commit is contained in:
2025-12-31 17:32:39 +08:00
parent 7ed84fd445
commit 1096f24c57
2 changed files with 10 additions and 4 deletions

View File

@@ -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;
} }

View File

@@ -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);