分享给好友的方法
share2Friend
tip
直接显示好友列表,选中要分享的好友即发生分享消息
分享给好友的方法
| 属性 | 类型 | 默认值 | 是否必填 | 描述 |
|---|---|---|---|---|
title | string | 是 | 分享标题 | |
desc | string | 否 | 分享描述 | |
link | string | 是 | 分享连接 | |
imgUrl | string | 否 | 分享图片 | |
success | function | 否 | 接口调用成功的回调函数 | |
fail | function | 否 | 接口调用失败的回调函数 | |
complete | function | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
示例代码
tip
如果参数没有传分享信息, 则取updateShareData的初始分享信息
dsBridge.call(
'share2Friend',
{
title: '辅城',
desc: '分享描述',
link: 'https://m.fccn.cc',
imgUrl: 'https://m.fccn.cc/shareLogo.png',
success(res) {
console.log(res)
}
}
)