api: wx.miniapp.shareImageMessage
分享图片到微信
注:
1、该接口仅适用于多端应用,不支持在小程序内使用
2、该接口不支持在「移动应用助手」中调试,开发者需构建 apk 或者 ipa 安装到手机后才能调试
wx.miniapp.shareImageMessage({
imagePath: '/pages/share.png',
thumbPath: '/pages/thumb.png',
scene: 0,
success(res) {
wx.showToast({
title: '成功:分享图片',
})
},
fail() {
wx.showToast({
title: '失败:分享图片',
})
}
})