//分享到朋友圈
document.getElementById('share-invitation-bottom-right').addEventListener('tap', function() {
if(shareImageUrl.length == 0) {
capture(false,"3");
}else{
shareWXTag(2);
}
});
function shareWXTag(tag){//分享好友 分享朋友圈
if(tag == 1){
sharewx.send({
type: "image",
pictures: [shareImageUrl],
extra: {
scene: "WXSceneSession"
}
}, function() {
plus.nativeUI.alert("分享成功!");
}, function(e) {
plus.nativeUI.alert("分享失败");
});
}else if(tag == 2){
sharewx.send({
type: "image",
pictures: [shareImageUrl],
extra: {
scene: "WXSceneTimeline"
}
}, function() {
plus.nativeUI.alert("分享成功!");
}, function(e) {
plus.nativeUI.alert("分享失败");
});
}
}
mui分享功能
最新推荐文章于 2023-04-27 15:05:30 发布