This commit is contained in:
2025-11-17 20:07:39 +08:00
parent ee433db4ad
commit 005e3c7581
43 changed files with 529 additions and 172 deletions

View File

@@ -42,12 +42,12 @@
__weak typeof(self) weakSelf = self;
[self.payVM applePayReqWithParams:params needShow:NO completion:^(NSInteger sta, NSString * _Nullable msg) {
[KBHUD dismiss];
[KBHUD showInfo:(sta == ERROR_CODE ? @"支付失败" : @"支付成功")];
[KBHUD showInfo:(sta == ERROR_CODE ? KBLocalized(@"Payment failed") : KBLocalized(@"Payment successful"))];
if (sta == SUCCESS_CODE) {
[[SKPaymentQueue defaultQueue] finishTransaction:transaction];
if (handler) handler(@"成功", nil);
if (handler) handler(KBLocalized(@"Success"), nil);
} else {
if (handler) handler(@"失败", nil);
if (handler) handler(KBLocalized(@"Failed"), nil);
}
(void)weakSelf; // keep self during block life if needed
}];
@@ -68,4 +68,3 @@
}
@end

View File

@@ -254,7 +254,7 @@ static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
}
- (void)agreementButtonAction{
[KBHUD showInfo:@"跳转协议"];
[KBHUD showInfo:KBLocalized(@"Open agreement")];
}
#pragma mark - Lazy UI

View File

@@ -127,10 +127,10 @@ static NSString * const kKBVipReviewListCellId = @"kKBVipReviewListCellId";
#pragma mark - Bottom Actions
- (void)onTapPayButton {
// TODO: UI
[KBHUD showInfo:@"Pay clicked"];
[KBHUD showInfo:KBLocalized(@"Pay clicked")];
}
- (void)agreementButtonAction{
[KBHUD showInfo:@"跳转协议"];
[KBHUD showInfo:KBLocalized(@"Open agreement")];
}
#pragma mark - UICollectionView DataSource

View File

@@ -18,12 +18,12 @@
if (needShow) { [KBHUD dismiss]; }
if (error) {
if (completion) completion(ERROR_CODE, error.localizedDescription ?: @"网络错误");
if (completion) completion(ERROR_CODE, error.localizedDescription ?: KBLocalized(@"Network error"));
return;
}
NSInteger sta = [self.class extractStatusFromResponseObject:jsonOrData response:response];
NSString *msg = [self.class extractMessageFromResponseObject:jsonOrData] ?: (sta == SUCCESS_CODE ? @"OK" : @"失败");
NSString *msg = [self.class extractMessageFromResponseObject:jsonOrData] ?: (sta == SUCCESS_CODE ? @"OK" : KBLocalized(@"Failed"));
if (completion) completion(sta, msg);
}];
}
@@ -62,4 +62,3 @@
}
@end