助力成功

This commit is contained in:
fengshuo
2022-10-28 18:45:22 +08:00
parent 136d582583
commit d9bfc48bc1
7 changed files with 55 additions and 5 deletions

View File

@@ -31,6 +31,7 @@
#import "Api+Room.h"
#import "Api+WishGift.h"
#import "StatisticsServiceHelper.h"
#import "NSObject+MJExtension.h"
///Model
#import "RoomInfoModel.h"
#import "MicroQueueModel.h"
@@ -50,6 +51,7 @@
#import "RoomPKTeamModel.h"
#import "RoomNewUserGreetModel.h"
#import "WishGiftInfoModel.h"
#import "WishGiftInfoUpdateModel.h"
///View
#import "XPRoomHalfWebView.h"
#import "XPAnchorAudienceUpMicView.h"
@@ -1739,8 +1741,8 @@
- (void)handleWishGiftMessage:(AttachmentModel *)attachment {
if (attachment.second == Custom_Message_Sub_Wish_Gift_Open || attachment.second == Custom_Message_Sub_Wish_Gift_Update) {
NSArray * array = [WishGiftInfoModel modelsWithArray:attachment.data[@"gifts"]];
self.wishGiftView.giftList = array;
WishGiftInfoUpdateModel * model = [WishGiftInfoUpdateModel modelWithJSON:attachment.data];
self.wishGiftView.giftList = model.gifts;
if (!self.wishGiftView.superview) {
[self addSubview:self.wishGiftView];
[self.wishGiftView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -1749,11 +1751,15 @@
make.size.mas_equalTo(CGSizeMake(81, 30));
}];
}
[self.wishGiftVC getWishGiftListSuccess:array];
[self.wishGiftVC getWishGiftListSuccess:model.gifts];
if (self.delegate.getRoomInfo.roomModeType == RoomModeType_Open_Blind) {
self.wishGiftView.hidden = YES;
}
if (model.senderUid.length > 0 && model.senderUid.integerValue == [AccountInfoStorage instance].getUid.integerValue) {
[XCHUDTool showSuccessWithMessage:@"助力成功"];
}
} else if (attachment.second == Custom_Message_Sub_Wish_Gift_Close) {
if (!self.wishGiftView.superview) {
[self.wishGiftVC getWishGiftListSuccess:@[]];