(客服云)iOS访客端点击订单消息
1、在HDMessageCell.m 的
- (void)_setupSubviewsWithType:(EMMessageBodyType)messageType
isSender:(BOOL)isSender
model:(id)model
方法中给orderBgView 添加手势
2、在HDMessageCell.m 中添加手势点击事件
3、在HDMessageViewController的
- (void)messageCellSelected:(id)model 方法中添加订单消息的判断
- (void)_setupSubviewsWithType:(EMMessageBodyType)messageType
isSender:(BOOL)isSender
model:(id)model
方法中给orderBgView 添加手势
UITapGestureRecognizer *tapRecognizer3 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(orderImageViewTapAction:)];
[_bubbleView.orderBgView addGestureRecognizer:tapRecognizer3];
2、在HDMessageCell.m 中添加手势点击事件
- (void)orderImageViewTapAction:(UITapGestureRecognizer *)tapRecognizer
{
if ([_delegate respondsToSelector:@selector(messageCellSelected:)]) {
[_delegate messageCellSelected:_model];
}
}
3、在HDMessageViewController的
- (void)messageCellSelected:(id)model 方法中添加订单消息的判断
代码:
if ([HDMessageHelper getMessageExtType:model.message] == HDExtOrderMsg) {
// 订单消息携带的扩展
NSDictionary *dic = model.message.ext;
NSLog(@"点击了订单消息");
}