文章目录
- uniapp官网地址:https://uniapp.dcloud.io/api/plugins/share?id=sharewithsystem 调用系统分享组件发送分享消息,不需要配置分享SDK 当中出现了图片,图片的优先级会大于文字。 uni.shareWithSystem({ type:”text”, summary: ‘补充文字’, href: ‘https://www.baidu.com/’, // imageUrl:”../../static/logo.png”, success(){ console.log(‘分享成功’); // 分享完成,请注意此时不一定是成功分享 }, fail(){ console.log(‘分享失败’); // 分享失败 } })
- 当中出现了图片,图片的优先级会大于文字。 不需要配置分享SDK uniapp官网地址:https://uniapp.dcloud.io/api/plugins/share?id=plussharesendwithsystem HTML5+API:http://www.html5plus.org/doc/zh_cn/share.html let msg={ type:’image’, pictures:[‘../../static/logo.png’] } plus.share.sendWithSystem(msg, function(){ console.log(‘分享成功’); }, function(e){ console.log(‘分享失败:’+JSON.stringify(e)); }); 有问题联系QQ1291481728或在下方评论,会在第一时刻处理。
uniapp官网地址:https://uniapp.dcloud.io/api/plugins/share?id=sharewithsystem
调用系统分享组件发送分享消息,不需要配置分享SDK
当中出现了图片,图片的优先级会大于文字。
uni.shareWithSystem({
type:"text",
summary: '补充文字',
href: 'https://www.baidu.com/',
// imageUrl:"../../static/logo.png",
success(){
console.log('分享成功');
// 分享完成,请注意此时不一定是成功分享
},
fail(){
console.log('分享失败');
// 分享失败
}
})
当中出现了图片,图片的优先级会大于文字。
不需要配置分享SDK
uniapp官网地址:https://uniapp.dcloud.io/api/plugins/share?id=plussharesendwithsystem
HTML5+API:http://www.html5plus.org/doc/zh_cn/share.html
let msg={
type:'image',
pictures:['../../static/logo.png']
}
plus.share.sendWithSystem(msg, function(){
console.log('分享成功');
}, function(e){
console.log('分享失败:'+JSON.stringify(e));
});
有问题联系QQ1291481728或在下方评论,会在第一时刻处理。
发表回复