Commit 3a27b8754440fb0209b84478c26e99aaf3356794

Authored by 张旭
1 parent 34eba323

接受礼物展示动画

LiveVideoCloud/Classes/Sections/InteractionSections/LiveBaseView.m
... ... @@ -527,12 +527,19 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型
527 527 case CNLive_ConversationType_CHATROOM:
528 528 {
529 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 540 chatMsgModel *model = [[chatMsgModel alloc] init];
534 541 model.name = message.userInfo.name;
535   - model.content = [msg objectForKey:msgContent];
  542 + model.content = [NSString stringWithFormat:@" 送了一个 %@",msgDic[@"giftName"]];
536 543 model.ID = message.targetId;
537 544 model.icon = message.userInfo.portraitUri;
538 545 model.cellWidth = self.chatTableView.width - 20;
... ... @@ -554,7 +561,7 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型
554 561  
555 562 chatMsgModel *barrageModel = [[chatMsgModel alloc] init];
556 563 barrageModel.name = message.userInfo.name;
557   - barrageModel.content = [msg objectForKey:msgContent];
  564 + barrageModel.content = [msgDic objectForKey:msgContent];
558 565 barrageModel.icon = message.userInfo.portraitUri;
559 566 [self.chatManager addAnimationWithModel:barrageModel animContentView:self.animationBaseView];
560 567 }
... ...