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真机和打包后都出现这个问题
k***@126.com (作者)
用HBuilder X 最新版本打包
2018-11-13 10:06