帖子
帖子
用户
博客
课程
显示全部楼层
37
帖子
1
勋章
647
Y币

[云开发] 融云rong.sendTextMessage不起作用,,,

[复制链接]
发表于 2022-7-25 17:22:42
本帖最后由 BIP7046 于 2022-7-25 20:09 编辑

具体情况如下:1.具体代码:

                                  rong.sendTextMessage({
                                                        conversationType : 'PRIVATE',
                                                        targetId : api.pageParam.id,
                                                        text : msg,
                                                        extra : JSON.stringify(extra)
                                                }, function(ret, err) {
                                                        if (ret.status == 'prepare') {
                                                                xx = ret.result.message.content.text.replace(reg, function(a, b) {
                                                                        return face[a] ? face[a] : a;
                                                                });
                                                        } else if (ret.status == 'success') {
                                                                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);
                                                        }
                                                });


2.运行效果
62de6009c07aa.png
在输入框输入文本信息无法显示,,,

3.调试后
62de606e3e0d9.png
去掉rong.sendTextMessage

62de60a83eb2d.png
能够发送成功,但没有rong.sendTextMessage无法进行即使聊天,,,
62de87daabcd9.png





你在if (ret.status == 'prepare') { 前面打日志 console.log(JSON.stringify(ret))  然后把日志截图出来
37
帖子
1
勋章
647
Y币
发了,在最后面
勇可可 · 2022-7-25 17:42你在if (ret.status == 'prepare') { 前面打日志 console.log(JSON.stringify(ret))  然后把日志截图出来
37
帖子
1
勋章
647
Y币
好像是安卓里面不执行'prepare'了,,,,,
勇可可 · 2022-7-25 17:42你在if (ret.status == 'prepare') { 前面打日志 console.log(JSON.stringify(ret))  然后把日志截图出来
不执行吗  你用的是什么版本
BIP7046 · 2022-7-26 00:38好像是安卓里面不执行'prepare'了,,,,,
37
帖子
1
勋章
647
Y币
2.0.8版本,高版本直接闪退,,,,
勇可可 · 2022-7-26 09:15不执行吗  你用的是什么版本
融云都360了 你咋还在2 用最新的。 低的有bug
BIP7046 · 2022-7-26 13:522.0.8版本,高版本直接闪退,,,,
37
帖子
1
勋章
647
Y币
高的进入聊天页面会闪退啊,我试试去
勇可可 · 2022-7-26 17:22融云都360了 你咋还在2 用最新的。 低的有bug
37
帖子
1
勋章
647
Y币
换了个330版本就好了
勇可可 · 2022-7-26 17:22融云都360了 你咋还在2 用最新的。 低的有bug
建议360  闪退可以解决的。
BIP7046 · 2022-7-26 22:11换了个330版本就好了
您需要登录后才可以回帖 登录

本版积分规则