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

[其他] tencentIM获得对方头像

[复制链接]
发表于 2021-5-11 09:49:42
!!!无法获取对方头像和昵称
点击对方 开始聊天这个是什么逻辑?
我点击对方是获取对方签名 还是我的?

jump_chat: function (params) {
                        var _this = this
                        var tencentIm = api.require('tencentIm');
                        tencentIm.init({
                        }, function (ret, err) {
                            if (ret) {
                                 //alert(JSON.stringify(ret));
                            } else {
                                alert(JSON.stringify(err));
                            }
                        });
                        var tencentIm = api.require('tencentIm');
                        tencentIm.addFriend({
                            identifier: _this.hist.mid,
                            remake: '',
                            addWording: '',
                            addSource: '',
                            friendGroup: '',
                        }, function (ret, err) {
                            if (ret) {
                                // alert(JSON.stringify(ret));
                                if (ret.status == true) {
                                    api.openWin({
                                        name: 'chat',
                                        url: './chat.html',
                                        pageParam: {
                                            name: _this.hist.mid
                                        }
                                    });
                                }
                            } else {
                                // alert(JSON.stringify(err));
                            }
                        });
                    }



380
帖子
4
勋章
6
Y币
点击头像,打开聊天页面,发送消息
您需要登录后才可以回帖 登录

本版积分规则