k***@126.com
k***@126.com
  • 发布:2018-09-03 17:01
  • 更新:2018-11-10 02:23
  • 阅读:921

分享回调的问题

分类:HTML5+

iOS下分享后回调函数不执行,android下不管分享成功与否,都执行成功回调,分享代码如下:


        function shareMessage(share, ex ,shareurl ,sharetit,sharecontent,shareimg) {  
            var msg = {  
                extra: {  
                    scene: ex  
                },  
                type:'web'  
            };  
            if(shareurl.indexOf('http://')<0){  
                msg.href = "http://m.bigshengzhou.com/"+shareurl;  
            }else{  
                msg.href = shareurl;  
            }  
            msg.title = sharetit;  
            msg.content = delHtmlTag(sharecontent).substring(0,100)+'[大嵊州APP]';  
            if (~share.id.indexOf('weibo')) {  
                msg.content += ";体验地址:http://www.bigshengzhou.com/";  
            }  

            msg.thumbs = [shareimg || oss_host+'applogo_64x64.png'];  
            share.send(msg, function() {  
                console.log("分享到\"" + share.description + "\"成功! ");  
            }, function(e) {  
                console.log("分享到\"" + share.description + "\"失败: " + e.code + " - " + e.message);  
            });  
        }

最新版HBuilder,IDE真机和打包后都出现这个问题

2018-09-03 17:01 负责人:无 分享
已邀请:
Winson1138

Winson1138

你解决到这个问题了吗

  • k***@126.com (作者)

    用HBuilder X 最新版本打包

    2018-11-13 10:06

该问题目前已经被锁定, 无法添加新回复