帖子
帖子
用户
博客
课程
显示全部楼层
2
帖子
0
勋章
16
Y币

[BUG] 融云sendTextMessage 返回状态值问题

[复制链接]
发表于 2019-3-6 19:59:39
融云, ios端调用sendTextMessage 这个方法,首先返回的success状态,然后返回prepare状态?这样不对吧?
使用自定义loader,也是新编译的,融云使用最新3.1.5版本

运行效果就是发送文本,直接进入了success,而后进入prepare
代码如下:
var xx;
                                                rong.sendTextMessage({
                                                        conversationType : 'PRIVATE',
                                                        targetId : api.pageParam.id,
                                                        text : msg,
                                                        extra : JSON.stringify(extra)
                                                }, function(ret, err) {
//                                                        alert(ret.status);
                                                        if (ret.status == 'prepare') {
//                                                                alert(JSON.stringify(ret))
                                                                xx = ret.result.message.content.text.replace(reg, function(a, b) {
                                                                        return face[a] ? face[a] : a;
                                                                });
                                                                alert(xx);
                                                        } else if (ret.status == 'success') {
                                                               
                                                                alert(JSON.stringify(ret));
                                                                alert(111);
                                                                var html = '';
                                                                html += '<div class="aui-chat-item aui-chat-right">';
                                                                html += '          <div class="aui-chat-media"><img src="' + $api.getStorage('tx') + '" /></div>';
                                                                html += '          <div class="aui-chat-inner"><div class="aui-chat-name">' + $api.getStorage('zh') + '</div>';
                                                                html += '               <div class="aui-chat-content">';
                                                                html += '                        <div class="aui-chat-arrow"></div>';
                                                                html += xx;
                                                                html += '               </div>';
                                                                html += '          </div>';
                                                                html += '</div>';
                                                                $api.append($api.dom('#msglist'), html);
                                                                pageDown(300);
                                                        }
                                                });


4
帖子
0
勋章
49
Y币
基本上是等不到答案的,融云这块只能靠自己
2
帖子
0
勋章
16
Y币
我醒着做梦 发表于 2019-3-6 22:12
基本上是等不到答案的,融云这块只能靠自己

哥们,你与没遇到类似情况啊?
4
帖子
0
勋章
49
Y币
lchniao 发表于 2019-3-7 09:01
哥们,你与没遇到类似情况啊?

遇到过很多类似的,最后还是自己琢磨解决了
您需要登录后才可以回帖 登录

本版积分规则