Compare commits

...

1 Commits

Author SHA1 Message Date
eggmanQQQ
7a3314751d hotfix: 修复 combo 不更新 wallet 值问题 2024-11-07 17:06:21 +08:00
5 changed files with 31 additions and 10 deletions

View File

@@ -274,10 +274,12 @@
[self.datasource addObjectsFromArray:list];
}
if (!self.bannerInfoList) {
self.loadBannerInfo();
}
[self sortDataSource];
self.displayDatasource = self.datasource;
// if (!self.bannerInfoList) {
// self.loadBannerInfo();
// }
// [self sortDataSource];
[self.collectionView reloadData];
[[NSNotificationCenter defaultCenter]postNotificationName:@"khomeVCRefreshComplete" object:nil];

View File

@@ -17,6 +17,7 @@ typedef enum : NSUInteger {
ComboAction_RemovePanel,
ComboAction_Error,
ComboAction_Combo_Count_Update,
ComboAction_Update_After_Send_Success
} ComboActionType;
typedef enum : NSUInteger {
@@ -30,6 +31,8 @@ NS_ASSUME_NONNULL_BEGIN
@interface GiftComboManager : NSObject
@property (nonatomic, strong) GiftReceiveInfoModel *sendGiftReceiveInfo;
// 单例方法
+ (instancetype)sharedManager;

View File

@@ -460,7 +460,9 @@
GiftReceiveInfoModel *receive = [GiftReceiveInfoModel modelWithJSON:data.data];
receive.sourceType = [[dic objectForKey:@"giftSource"] integerValue];
receive.roomSendGiftType = [[dic objectForKey:@"giftType"] integerValue];
[self handleSendGiftSuccess:data];
NSArray *array = [allUIDs componentsSeparatedByString:@","];
receive.receiveGiftNumberUser = array.count;
[self handleSendGiftSuccess:receive sourceData:data];
} else {
self.errorMessage = msg;
self.actionCallback(ComboAction_RemovePanel);
@@ -478,15 +480,16 @@
uid:[AccountInfoStorage instance].getUid];
}
- (void)handleSendGiftSuccess:(BaseModel *)response {
- (void)handleSendGiftSuccess:(GiftReceiveInfoModel *)receive
sourceData:(BaseModel *)response {
if (self.actionCallback) {
self.actionCallback(ComboAction_Combo_Count_Update);
}
GiftReceiveInfoModel *receive = [GiftReceiveInfoModel modelWithJSON:response.data];
if (!receive) {
return;
self.sendGiftReceiveInfo = receive;
if (self.actionCallback) {
self.actionCallback(ComboAction_Update_After_Send_Success);
}
NSDictionary *tempDic = response.data;

View File

@@ -133,6 +133,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) NSInteger comboCount;
@property (nonatomic, assign) NSInteger receiveGiftNumberUser;
- (NSInteger)receiveUserCount;
@end

View File

@@ -185,6 +185,17 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
case ComboAction_Error: {
[self showErrorToast:[[GiftComboManager sharedManager] loadErrorMessage]];
}
break;
case ComboAction_Update_After_Send_Success: {
GiftReceiveInfoModel *receiveInfo = [GiftComboManager sharedManager].sendGiftReceiveInfo;
if (receiveInfo.sourceType == GiftSourceType_Pack) {
///
[self.giftInfoView updatePackSource:receiveInfo numberUser:receiveInfo.receiveGiftNumberUser];
} else {
self.giftBarView.walletInfoModel = receiveInfo.userPurse;
}
}
break;
default:
break;
}