Commit 13c207e6c6d4fee72583cccaee55ec6091383897
1 parent
119c6b6f
更改私聊
Showing
4 changed files
with
13 additions
and
3 deletions
LiveVideoCloud/Classes/Sections/InteractionSections/Gift/Present/ComboCell.m
| ... | ... | @@ -37,7 +37,7 @@ |
| 37 | 37 | - (void)setModel:(GiftModel *)model |
| 38 | 38 | { |
| 39 | 39 | _model = model; |
| 40 | - [self.icon sd_setImageWithURL:[NSURL URLWithString:model.icon] placeholderImage:nil];//[UIImage zx_circleImageNamed:model.icon]; | |
| 40 | + [self.icon sd_setImageWithURL:[NSURL URLWithString:model.icon] placeholderImage:[UIImage imageNamed:@"defaultUserIcon"]]; | |
| 41 | 41 | self.senderNameLbl.text = model.sender; |
| 42 | 42 | self.giftNameLbl.text = [NSString stringWithFormat:@"送一个%@",model.giftName]; |
| 43 | 43 | self.senderNameLbl.size = [self.senderNameLbl labelSize]; | ... | ... |
LiveVideoCloud/Classes/Sections/InteractionSections/LiveBaseView.m
| ... | ... | @@ -251,6 +251,7 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 251 | 251 | return YES; |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | +#pragma mark - bounceTypeClick | |
| 254 | 255 | - (void)bounceBtnType:(BounceBtnType)btnType model:(userInfoModel *_Nonnull)model |
| 255 | 256 | { |
| 256 | 257 | switch (btnType) { |
| ... | ... | @@ -312,9 +313,11 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 312 | 313 | } |
| 313 | 314 | } |
| 314 | 315 | |
| 316 | +#pragma mark - PrivateMethod | |
| 315 | 317 | - (void)showPrivateView |
| 316 | 318 | { |
| 317 | 319 | PrivateView *privateView = [PrivateView privateView]; |
| 320 | + privateView.roomId = _roomId; | |
| 318 | 321 | privateView.backgroundColor = [UIColor whiteColor]; |
| 319 | 322 | [self addSubview:privateView]; |
| 320 | 323 | privateView.delegate = self; |
| ... | ... | @@ -382,7 +385,7 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 382 | 385 | |
| 383 | 386 | - (NSString *)giftModelToJSON:(GiftModel *)model |
| 384 | 387 | { |
| 385 | - NSDictionary *dic = @{chatType:giftType,chatMessage:@{msgGiftName:model.giftName,msgGiftNumber:[NSString stringWithFormat:@"%zd",model.giftNumber],msgGiftPrice:model.price}}; | |
| 388 | + NSDictionary *dic = @{chatType:giftType,chatMessage:@{msgGiftName:model.giftName,msgGiftNumber:[NSString stringWithFormat:@"%zd",model.giftNumber],msgGiftPrice:model.price,msgContent:model.giftName}}; | |
| 386 | 389 | return [Tools dictionaryToJson:dic]; |
| 387 | 390 | } |
| 388 | 391 | ... | ... |
LiveVideoCloud/Classes/Sections/InteractionSections/PrivateView/PrivateView.h
LiveVideoCloud/Classes/Sections/InteractionSections/PrivateView/PrivateView.m
| ... | ... | @@ -63,6 +63,11 @@ static NSString *message_content = @"message_content"; |
| 63 | 63 | [self textFieldShouldReturn:self.textField]; |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | +- (void)setRoomId:(NSString *)roomId | |
| 67 | +{ | |
| 68 | + _roomId = roomId; | |
| 69 | +} | |
| 70 | + | |
| 66 | 71 | - (void)dealloc |
| 67 | 72 | { |
| 68 | 73 | [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil]; |
| ... | ... | @@ -102,7 +107,7 @@ static NSString *message_content = @"message_content"; |
| 102 | 107 | NSDictionary *dic = @{message_content:textField.text}; |
| 103 | 108 | weakself |
| 104 | 109 | NSString *message = [Tools dictionaryToJson:dic]; |
| 105 | - [[CNLiveChatManager sharedCNLiveChatManager] sendMessage:message type:CNLive_ConversationType_PRIVATE targetId:@"20170328" success:^(CNLiveChatMessage *message) { | |
| 110 | + [[CNLiveChatManager sharedCNLiveChatManager] sendMessage:message type:CNLive_ConversationType_PRIVATE targetId:_roomId success:^(CNLiveChatMessage *message) { | |
| 106 | 111 | |
| 107 | 112 | dispatch_async(dispatch_get_main_queue(), ^{ |
| 108 | 113 | strongself | ... | ... |