注册

环信网页的onready 轨迹回调在电脑浏览器上有效 但是在手机浏览器上就不会触发了

       环信网页的onready 轨迹回调在电脑浏览器上有效 但是在手机浏览器上就不会触发了 有大神指导是怎么回事吗?

附上代码:
<script>
    var saleprice = document.getElementById("spSalaPrice");
    var productName = document.getElementById("productName");
    var productPic = document.getElementById("productPic").src;
    window.easemobim = window.easemobim || {};
    easemobim.config = {
        
        //是否隐藏小的悬浮按钮
        hide: true,
        //自动连接
        autoConnect: true,
        //聊天窗口加载成功回调
        onready: function () {
            easemobim.sendExt({
                ext: {
                    "imageName": "mallImage3.png",
                    //custom代表自定义消息,无需修改
                    "type": "custom",
                    "msgtype": {
                        "track": {
                            "title": "我正在看:",
                            "price": "$: " + saleprice.textContent,
                            "desc": productName.textContent,
                            "img_url": productPic,
                            "item_url": window.location.href
                        }
                    }
                }
            });
        },
    };
</script>

0 个评论

要回复文章请先登录注册