This commit is contained in:
2025-12-04 21:53:47 +08:00
parent f7d11c5f8b
commit d2258883df
5 changed files with 20 additions and 10 deletions

View File

@@ -5,6 +5,7 @@
#import "KBJfPay.h"
#import "KBJfPayCell.h"
#import "FGIAPProductsFilter.h"
#import "FGIAPManager.h"
static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
@interface KBJfPay () <UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
@@ -61,7 +62,7 @@ static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
@{ @"coins": @9990, @"price": @"$99.90" ,@"product_id" : @"100_coin" },
@{ @"coins": @19990,@"price": @"$199.90" ,@"product_id" : @"100_coin" },
];
self.selectedIndex = 1; //
self.selectedIndex = 0;
//
[self.view addSubview:self.myPointsTitleLabel];
@@ -244,12 +245,18 @@ static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
// }
NSString *productId = @"com.yolo.vip.1month";
/// 2.
[KBHUD show];
[self.filter requestProductsWith:[NSSet setWithObject:productId] completion:^(NSArray<SKProduct *> * _Nonnull products) {
NSLog(@"=====");
// if (products.count > 0) {
// SKProduct *pro = productsp[0];
// }
// [[FGIAPManager shared].iap buyProduct:product onCompletion:^(NSString * _Nonnull message, FGIAPManagerPurchaseRusult result) { }];
/// 3.
// [[FGIAPManager shared].iap buyProduct:products.firstObject onCompletion:^(NSString * _Nonnull message, FGIAPManagerPurchaseRusult result) {
[[FGIAPManager shared].iap buyProduct:products.firstObject onCompletion:^(NSString * _Nonnull message, FGIAPManagerPurchaseRusult result) {
// [self.view makeToast:message];
// }];
}];
}];
}