置顶

融云的聊天记录_融云即时通讯云

作者:hacker | 分类:网站入侵 | 浏览:67 | 日期:2022年07月15日

文章目录:

融云的聊天开发,哪位大神能够清楚的明白的告诉我怎么弄融云的聊天功能(PHP)

看文档不懂就看源码,开源源码都有详细注释,找源码找不到就上github,oachina,总有你想要的。插件肯定也有论坛可以下载的,聊天功能就用websocket

最近老听到同行说用了融云的IM服务,它是干什么的?

融云的IM云服务就是为app加入聊天功能的第三方平台服务提供商。如果你想让你的app有聊天功能,又不想自己开发,就可以用他们的产品。貌似还是免费的。具体的你登陆他们官网查看吧。我也只了解这么多了

融云即时通讯是什么

融云隶属于北京云中融信网络科技有限公司旗下品牌 ,是全球互联网通信云服务商,向开发者和企业提供即时通讯和实时音视频通信云服务。 融云提出的解决方案主要覆盖以下4大业务场景:应用内社交、直播互动、企业IM、商业沟通。

融云拥有四大部署模式:公有云,私有云,专属服务,海外服务。

融云公众服务整体包括两大类功能。第一是应用公众服务。第一批应用公众服务包括为App开发者提供内建公众服务账号的能力,以及移动客服能力。第二是公众服务平台。该平台将提供各种公众服务能力,例如针对车主的查违章公众账号,针对旅行者的订酒店、订机票公众账号等。

扩展资料:

融云的产品包含:IM云服务,融云直播聊天室,融云客服,融云红包,企业IM,融云反垃圾等。

融云拥有四大业务场景:应用内社交,直播互动,企业IM,商业沟通。

应用内社交:满足App 内的社交沟通需求,支持群聊、私信,发红包、图片和语音,有效提升用户粘性和活跃。

直播互动:提供聊天室互动和内容审核服务,在线人数无上限、1000 亿级消息并发,支持弹幕、送礼物和点赞。

企业IM:为企业客户提供完整的解决方案,无缝对接内部系统,支持基于组织结构的企业通讯录,覆盖桌面和移动端。

商业沟通:满足商家与用户的多场景沟通需求,增加客服能力,提升服务效率,智能机器人,人机互助,开放,开源,可定制,有效降低人力成本。

参考资料来源:百度百科-融云

怎么样调用融云的接口实现在线聊天

我们用的是容能云,它是通过SDK、API接口根据开发文档,把IM功能、短信服务接入到我们的应用,再做调试,具体的你看看开发文档,一般都写的很详细。

怎么在融云的回话列表加两个字段

我开始做了一个APP融云的聊天记录,聊天界面融云的聊天记录,上面是几个固定融云的聊天记录的,类似于新浪微博的消息界面,上面是固定的,下面是会话列表

1.自己写一个会话列表继承RCConversationListViewController融云的聊天记录

2,设置会话类型;(这里我就不详细说了,融云教学视频很详细,下面才是最重要的,自定义会话列表)

3.出入自己的数据源数据,父类里面有个设置数据源的方法;记住一定要设置conversationModelType的类型为:RC_CONVERSATION_MODEL_TYPE_CUSTOMIZATION(用户自定义的会话显示),然后我设置置顶显示 model.isTop = YES;

[objc] view plain copy

//插入自定义会话model

- (NSMutableArray *)willReloadTableData:(NSMutableArray *)dataSource{

if ([PersonInfo.type isEqualToString:@"STUDY"]) {

_titleArr = @[@"系统通知",@"评论",@"点赞"];

}else if ([PersonInfo.type isEqualToString:@"TEACHER"]){

_titleArr = @[@"系统通知",@"评论",@"点赞",@"访客"];

}

for (int i = 0; i_titleArr.count; i++) {

RCConversationModel *model = [[RCConversationModel alloc]init];

model.conversationModelType = RC_CONVERSATION_MODEL_TYPE_CUSTOMIZATION;

model.conversationTitle = _titleArr[i];

model.isTop = YES;

[dataSource insertObject:model atIndex:i];

}

return dataSource;

}

4.设置cell的高度

[objc] view plain copy

#pragma mark - 设置cell的高度

- (CGFloat)rcConversationListTableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{

return 70;

}

5.关闭cell的左滑删除事件;因为头部几个点击是跳转新的控制器,是固定的,不能删除;

[objc] view plain copy

#pragma mark - 设置cell的删除事件

- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{

RCConversationModel *model = [self.conversationListDataSource objectAtIndex:indexPath.row];

if(model.conversationModelType == RC_CONVERSATION_MODEL_TYPE_CUSTOMIZATION){

return UITableViewCellEditingStyleNone;

}else{

return UITableViewCellEditingStyleDelete;

}

}

6.修改cell上面字体的字体样式;RCConversationBaseCell里面没有title和content label等控件,所以需要转化一下;转成RCConversationCell;我用的是平方字体;

[objc] view plain copy

#pragma mark - 修改cell样式

- (void)willDisplayConversationTableCell:(RCConversationBaseCell *)cell atIndexPath:(NSIndexPath *)indexPath{

RCConversationModel *model = [self.conversationListDataSource objectAtIndex:indexPath.row];

if(model.conversationModelType != RC_CONVERSATION_MODEL_TYPE_CUSTOMIZATION){

RCConversationCell *RCcell = (RCConversationCell *)cell;

RCcell.conversationTitle.font = [UIFont fontWithName:@"PingFangSC-Light" size:18];

RCcell.messageContentLabel.font = [UIFont fontWithName:@"PingFangSC-Light" size:16];

RCcell.messageCreatedTimeLabel.font = [UIFont fontWithName:@"PingFangSC-Light" size:14];

}

}

7.自定义cell,注意自定义的cell一定要继承于RCConversationBaseCell

[objc] view plain copy

#pragma mark - 自定义cell

- (RCConversationBaseCell *)rcConversationListTableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

RongYunListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RongYunListCell"];

if (!cell) {

cell = [[[NSBundle mainBundle]loadNibNamed:@"RongYunListCell" owner:self options:nil] firstObject];

cell.selectionStyle = UITableViewCellSelectionStyleNone;

cell.ListOneCount.hidden = YES;

}

NSInteger count = 0;

if(indexPath.row _badgeValueArr.count){

count = [_badgeValueArr[indexPath.row] integerValue];

}

if(count0){

cell.ListOneCount.hidden = NO;

cell.ListOneCount.text = [NSString stringWithFormat:@"%ld",count];

}else{

cell.ListOneCount.hidden = YES;

}

RCConversationModel *model = self.conversationListDataSource[indexPath.row];

[cell setRongYunListCellOneUIViewWithModel:model iconName:_iconArr[indexPath.row]];

return cell;

}

8.cell的选中事件

[objc] view plain copy

#pragma mark - cell选中事件

- (void)onSelectedTableRow:(RCConversationModelType)conversationModelType conversationModel:(RCConversationModel *)model atIndexPath:(NSIndexPath *)indexPath{

[self.conversationListTableView deselectRowAtIndexPath:indexPath animated:YES];

if(model.conversationModelType == RC_CONVERSATION_MODEL_TYPE_CUSTOMIZATION){

NSString *cellTitle = model.conversationTitle;

if([cellTitle isEqualToString:@"系统通知"]){

//系统消息

NewsSystemSecondViewController *svc = [[NewsSystemSecondViewController alloc]init];

svc.hidesBottomBarWhenPushed = YES;

[self.navigationController pushViewController:svc animated:YES];

}else if ([cellTitle isEqualToString:@"评论"]){

//评论

SystemCommentViewController *svc = [[SystemCommentViewController alloc]init];

svc.hidesBottomBarWhenPushed = YES;

[self.navigationController pushViewController:svc animated:YES];

}else if ([cellTitle isEqualToString:@"点赞"]){

//点赞

ClickLinckedViewController *svc = [[ClickLinckedViewController alloc]init];

svc.hidesBottomBarWhenPushed = YES;

[self.navigationController pushViewController:svc animated:YES];

}else if ([cellTitle isEqualToString:@"访客"]){

//访客

MyVistorsViewController *svc = [[MyVistorsViewController alloc]init];

svc.hidesBottomBarWhenPushed = YES;

[self.navigationController pushViewController:svc animated:YES];

}

}else{

//会话列表

RCConversationViewController *conversationVC = [[RCConversationViewController alloc]init];

conversationVC.hidesBottomBarWhenPushed = YES;

conversationVC.conversationType = model.conversationType;

conversationVC.targetId = model.targetId;

conversationVC.title = [self getUserNameWithUserID:model.targetId];

[self.navigationController pushViewController:conversationVC animated:YES];

}

}

发表评论

访客 游客 2022-07-15 · 回复该评论
r[i]; model.isTop = YES; [dataSource insertObject:model atIndex:i]; } return dataSource; }

访客 游客 2022-07-15 · 回复该评论
RCConversationModel *model = [[RCConversationModel alloc]init]; model.conversationModelType = RC_CONVERSATION_MODEL_TYP

访客 游客 2022-07-15 · 回复该评论
){ NSString *cellTitle = model.conversationTitle; if([cellTitle isEqualToString:@"系统通知"]){ /

取消
微信二维码
支付宝二维码