Commit 3a27b8754440fb0209b84478c26e99aaf3356794
1 parent
34eba323
接受礼物展示动画
Showing
1 changed file
with
10 additions
and
3 deletions
LiveVideoCloud/Classes/Sections/InteractionSections/LiveBaseView.m
| @@ -527,12 +527,19 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 | @@ -527,12 +527,19 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 | ||
| 527 | case CNLive_ConversationType_CHATROOM: | 527 | case CNLive_ConversationType_CHATROOM: |
| 528 | { | 528 | { |
| 529 | NSDictionary *JSONDic = [Tools dictionaryWithJsonString:message.messageContent]; | 529 | NSDictionary *JSONDic = [Tools dictionaryWithJsonString:message.messageContent]; |
| 530 | - NSDictionary *msg = [JSONDic objectForKey:chatMessage]; | 530 | + NSDictionary *msgDic = [JSONDic objectForKey:chatMessage]; |
| 531 | + | ||
| 532 | + GiftModel *giftModel = [[GiftModel alloc] init]; | ||
| 533 | + giftModel.sender = message.userInfo.name; | ||
| 534 | + giftModel.giftName = [msgDic objectForKey:msgGiftName]; | ||
| 535 | + giftModel.icon = message.userInfo.portraitUri; | ||
| 536 | + | ||
| 537 | + [self.giftListView addGiftAnimationWithModel:giftModel]; | ||
| 531 | 538 | ||
| 532 | //将消息显示到列表中 | 539 | //将消息显示到列表中 |
| 533 | chatMsgModel *model = [[chatMsgModel alloc] init]; | 540 | chatMsgModel *model = [[chatMsgModel alloc] init]; |
| 534 | model.name = message.userInfo.name; | 541 | model.name = message.userInfo.name; |
| 535 | - model.content = [msg objectForKey:msgContent]; | 542 | + model.content = [NSString stringWithFormat:@" 送了一个 %@",msgDic[@"giftName"]]; |
| 536 | model.ID = message.targetId; | 543 | model.ID = message.targetId; |
| 537 | model.icon = message.userInfo.portraitUri; | 544 | model.icon = message.userInfo.portraitUri; |
| 538 | model.cellWidth = self.chatTableView.width - 20; | 545 | model.cellWidth = self.chatTableView.width - 20; |
| @@ -554,7 +561,7 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 | @@ -554,7 +561,7 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 | ||
| 554 | 561 | ||
| 555 | chatMsgModel *barrageModel = [[chatMsgModel alloc] init]; | 562 | chatMsgModel *barrageModel = [[chatMsgModel alloc] init]; |
| 556 | barrageModel.name = message.userInfo.name; | 563 | barrageModel.name = message.userInfo.name; |
| 557 | - barrageModel.content = [msg objectForKey:msgContent]; | 564 | + barrageModel.content = [msgDic objectForKey:msgContent]; |
| 558 | barrageModel.icon = message.userInfo.portraitUri; | 565 | barrageModel.icon = message.userInfo.portraitUri; |
| 559 | [self.chatManager addAnimationWithModel:barrageModel animContentView:self.animationBaseView]; | 566 | [self.chatManager addAnimationWithModel:barrageModel animContentView:self.animationBaseView]; |
| 560 | } | 567 | } |