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