修复bug

This commit is contained in:
liyuhua
2023-10-10 18:37:35 +08:00
parent ad27327d13
commit d3035b2158
8 changed files with 37 additions and 38 deletions

View File

@@ -31,7 +31,7 @@
</Testables> </Testables>
</TestAction> </TestAction>
<LaunchAction <LaunchAction
buildConfiguration = "Debug" buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0" launchStyle = "0"

View File

@@ -25,8 +25,6 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,assign) BOOL canOpen; @property (nonatomic,assign) BOOL canOpen;
///是否刷新了 ///是否刷新了
@property (nonatomic,assign) BOOL isLoad; @property (nonatomic,assign) BOOL isLoad;
///是否刷新了
@property (nonatomic,assign) BOOL isLoad;
///房间id用于分享房间跳转到房间 ///房间id用于分享房间跳转到房间
@property (nonatomic, copy) NSString *__nullable roomId; @property (nonatomic, copy) NSString *__nullable roomId;
///用户id用于外部h5跳转到聊天页面 ///用户id用于外部h5跳转到聊天页面

View File

@@ -327,7 +327,7 @@
if (@available(iOS 15.0, *)) { if (@available(iOS 15.0, *)) {
PIIAPRegulate *iap = [PIIAPRegulate shared]; PIIAPRegulate *iap = [PIIAPRegulate shared];
[iap demandShopedThingWithProductId:chargeProdId uuid:uuid completionHandler:^(NSError * _Nullable error) { [iap demandCommodityThingWithProductId:chargeProdId uuid:uuid completionHandler:^(NSError * _Nullable error) {
}]; }];
@kWeakify(self); @kWeakify(self);
@@ -406,7 +406,7 @@
[XNDJTDDLoadingTool hideOnlyView:kWindow]; [XNDJTDDLoadingTool hideOnlyView:kWindow];
if (@available(iOS 15.0, *)) { if (@available(iOS 15.0, *)) {
PIIAPRegulate *iap = [PIIAPRegulate shared]; PIIAPRegulate *iap = [PIIAPRegulate shared];
[iap verifyBusinessFinishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{ [iap verifyBusinessAccomplishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
}]; }];
} }
@@ -425,7 +425,7 @@
if(code == 1444){ if(code == 1444){
if (@available(iOS 15.0, *)) { if (@available(iOS 15.0, *)) {
PIIAPRegulate *iap = [PIIAPRegulate shared]; PIIAPRegulate *iap = [PIIAPRegulate shared];
[iap verifyBusinessFinishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{ [iap verifyBusinessAccomplishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
}]; }];
} }

View File

@@ -355,7 +355,7 @@
if (@available(iOS 15.0, *)) { if (@available(iOS 15.0, *)) {
PIIAPRegulate *iap = [PIIAPRegulate shared]; PIIAPRegulate *iap = [PIIAPRegulate shared];
[iap demandShopedThingWithProductId:chargeProdId uuid:uuid completionHandler:^(NSError * _Nullable error) { [iap demandCommodityThingWithProductId:chargeProdId uuid:uuid completionHandler:^(NSError * _Nullable error) {
}]; }];
@kWeakify(self); @kWeakify(self);
@@ -430,7 +430,7 @@
[XNDJTDDLoadingTool hideHUDInView:kWindow]; [XNDJTDDLoadingTool hideHUDInView:kWindow];
if (@available(iOS 15.0, *)) { if (@available(iOS 15.0, *)) {
PIIAPRegulate *iap = [PIIAPRegulate shared]; PIIAPRegulate *iap = [PIIAPRegulate shared];
[iap verifyBusinessFinishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{ [iap verifyBusinessAccomplishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
}]; }];
} }
@@ -448,7 +448,7 @@
if(code == 1444){ if(code == 1444){
if (@available(iOS 15.0, *)) { if (@available(iOS 15.0, *)) {
PIIAPRegulate *iap = [PIIAPRegulate shared]; PIIAPRegulate *iap = [PIIAPRegulate shared];
[iap verifyBusinessFinishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{ [iap verifyBusinessAccomplishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
}]; }];
} }

View File

@@ -25,7 +25,7 @@
#import "XPMonentsPublishViewController.h" #import "XPMonentsPublishViewController.h"
@interface XPMonentTopicContainerViewController ()<JXPagerViewDelegate,JXCategoryViewDelegate> @interface XPMonentTopicContainerViewController ()<JXPagerViewDelegate,JXCategoryViewDelegate>
@property (nonatomic,strong) JXCategoryTitleView *categoryView; @property (nonatomic,strong) JXCategoryTitleView *pi_categoryView;
@property (nonatomic,strong) JXCategoryIndicatorLineView *lineView; @property (nonatomic,strong) JXCategoryIndicatorLineView *lineView;
@property (nonatomic,strong) JXPagerListRefreshView *pagerContentView; @property (nonatomic,strong) JXPagerListRefreshView *pagerContentView;
@property (nonatomic,strong) NSArray<NSString *> *titles; @property (nonatomic,strong) NSArray<NSString *> *titles;
@@ -101,7 +101,7 @@
} }
- (UIView *)viewForPinSectionHeaderInPagerView:(JXPagerView *)pagerView { - (UIView *)viewForPinSectionHeaderInPagerView:(JXPagerView *)pagerView {
return self.categoryView; return self.pi_categoryView;
} }
- (NSInteger)numberOfListsInPagerView:(JXPagerView *)pagerView { - (NSInteger)numberOfListsInPagerView:(JXPagerView *)pagerView {
@@ -137,27 +137,27 @@
self.latestVC.worldId = _worldId; self.latestVC.worldId = _worldId;
} }
- (JXCategoryTitleView *)categoryView { - (JXCategoryTitleView *)pi_categoryView {
if (!_categoryView) { if (!_pi_categoryView) {
_categoryView = [[JXCategoryTitleView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 46)]; _pi_categoryView = [[JXCategoryTitleView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 46)];
_categoryView.titles = self.titles; _pi_categoryView.titles = self.titles;
_categoryView.backgroundColor = [UIColor whiteColor]; _pi_categoryView.backgroundColor = [UIColor whiteColor];
_categoryView.delegate = self; _pi_categoryView.delegate = self;
_categoryView.titleSelectedColor = [DJDKMIMOMColor mainTextColor]; _pi_categoryView.titleSelectedColor = [DJDKMIMOMColor mainTextColor];
_categoryView.titleColor = [DJDKMIMOMColor secondTextColor]; _pi_categoryView.titleColor = [DJDKMIMOMColor secondTextColor];
_categoryView.titleSelectedFont = [UIFont boldSystemFontOfSize:18]; _pi_categoryView.titleSelectedFont = [UIFont boldSystemFontOfSize:18];
_categoryView.titleFont = [UIFont systemFontOfSize:15]; _pi_categoryView.titleFont = [UIFont systemFontOfSize:15];
_categoryView.titleColorGradientEnabled = YES; _pi_categoryView.titleColorGradientEnabled = YES;
_categoryView.titleLabelZoomEnabled = NO; _pi_categoryView.titleLabelZoomEnabled = NO;
_categoryView.indicators = @[self.lineView]; _pi_categoryView.indicators = @[self.lineView];
_categoryView.listContainer = (id<JXCategoryViewListContainer>)self.pagerContentView.listContainerView; _pi_categoryView.listContainer = (id<JXCategoryViewListContainer>)self.pagerContentView.listContainerView;
_categoryView.averageCellSpacingEnabled = NO; _pi_categoryView.averageCellSpacingEnabled = NO;
_categoryView.contentEdgeInsetLeft = 20; _pi_categoryView.contentEdgeInsetLeft = 20;
_categoryView.contentEdgeInsetRight = 20; _pi_categoryView.contentEdgeInsetRight = 20;
_categoryView.cellSpacing = 30; _pi_categoryView.cellSpacing = 30;
} }
return _categoryView; return _pi_categoryView;
} }
- (JXCategoryIndicatorLineView *)lineView { - (JXCategoryIndicatorLineView *)lineView {

View File

@@ -317,7 +317,7 @@
if (@available(iOS 15.0, *)) { if (@available(iOS 15.0, *)) {
PIIAPRegulate *iap = [PIIAPRegulate shared]; PIIAPRegulate *iap = [PIIAPRegulate shared];
[iap demandShopedThingWithProductId:chargeProdId uuid:uuid completionHandler:^(NSError * _Nullable error) { [iap demandCommodityThingWithProductId:chargeProdId uuid:uuid completionHandler:^(NSError * _Nullable error) {
}]; }];
@kWeakify(self); @kWeakify(self);
@@ -454,7 +454,7 @@
if(code == 1444){ if(code == 1444){
if (@available(iOS 15.0, *)) { if (@available(iOS 15.0, *)) {
PIIAPRegulate *iap = [PIIAPRegulate shared]; PIIAPRegulate *iap = [PIIAPRegulate shared];
[iap verifyBusinessFinishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{ [iap verifyBusinessAccomplishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
}]; }];
} }
@@ -473,7 +473,7 @@
- (void)checkReceiptSuccess:(NSString *)transcationId { - (void)checkReceiptSuccess:(NSString *)transcationId {
if (@available(iOS 15.0, *)) { if (@available(iOS 15.0, *)) {
PIIAPRegulate *iap = [PIIAPRegulate shared]; PIIAPRegulate *iap = [PIIAPRegulate shared];
[iap verifyBusinessFinishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{ [iap verifyBusinessAccomplishWithTransaction:[NSString stringWithFormat:@"%@",transcationId] completionHandler:^{
}]; }];
} }

View File

@@ -32,6 +32,7 @@ static NSString * kUpdateVersionNum = @"kUpdateVersionNum";
return; return;
} }
if ([[AccountInfoStorage instance] getTicket].length > 0) { if ([[AccountInfoStorage instance] getTicket].length > 0) {
[[self getView] autoLoginSuccess];
return; return;
} }
[Api requestTicket:[self createHttpCompletion:^(BaseModel * _Nonnull data) { [Api requestTicket:[self createHttpCompletion:^(BaseModel * _Nonnull data) {

View File

@@ -76,7 +76,7 @@ public class PIIAPRegulate: NSObject {
// //
@objc public func demandShopedThing(productId:String, uuid: String) async throws { @objc public func demandCommodityThing(productId:String, uuid: String) async throws {
if(ConditionBlock != nil ){ if(ConditionBlock != nil ){
ConditionBlock(StoreConditionResult.start,nil) ConditionBlock(StoreConditionResult.start,nil)
} }
@@ -123,7 +123,7 @@ public class PIIAPRegulate: NSObject {
switch result { switch result {
case .success(let verification): // case .success(let verification): //
let transaction = try await verifiedAndFinish(verification) let transaction = try await verifiedAndAccomplish(verification)
return transaction return transaction
case .userCancelled: // case .userCancelled: //
if(ConditionBlock != nil ){ if(ConditionBlock != nil ){
@@ -161,7 +161,7 @@ public class PIIAPRegulate: NSObject {
} }
// & // &
func verifiedAndFinish(_ verification:VerificationResult<Transaction>) async throws -> Transaction?{ func verifiedAndAccomplish(_ verification:VerificationResult<Transaction>) async throws -> Transaction?{
//Check whether the transaction is verified. If it isn't, //Check whether the transaction is verified. If it isn't,
//this function rethrows the verification error. //this function rethrows the verification error.
let transaction = try checkVerified(verification) let transaction = try checkVerified(verification)
@@ -207,7 +207,7 @@ public class PIIAPRegulate: NSObject {
} }
// //
@objc public func verifyBusinessFinish(transaction:String) async{ @objc public func verifyBusinessAccomplish(transaction:String) async{
if(transactionMap[transaction] != nil){ if(transactionMap[transaction] != nil){
await transactionMap[transaction]!.finish() await transactionMap[transaction]!.finish()
transactionMap.removeValue(forKey: transaction) transactionMap.removeValue(forKey: transaction)
@@ -234,7 +234,7 @@ public class PIIAPRegulate: NSObject {
do { do {
print("iap: updates") print("iap: updates")
print("result:\(result)") print("result:\(result)")
try await self.verifiedAndFinish(result) try await self.verifiedAndAccomplish(result)
} catch { } catch {
//StoreKit has a transaction that fails verification. Don't deliver content to the user. //StoreKit has a transaction that fails verification. Don't deliver content to the user.
print("Transaction failed verification") print("Transaction failed verification")