分享按钮-bug
发布于 6 年前 作者 lei87 7258 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)

onShareAppMessage: function() {

let that = this;

return {

title: that.data.userInfos.name + ‘********’, // 分享标题

desc: “**********”, // 分享描述

path: ‘pagesAnswer/pages/makeVideo/makeVideo?type=’ + that.data.activeIndex + ‘&url=’ + that.data.videoUrl + ‘&name=’ + that.data.userInfos.name + ‘&logo=’ + that.data.userInfos.avator, // 分享路径,

success: function(res) {

console.log(‘分享成功’)

console.log(res)

that.checkVideo();

},

fail: function(res) {

console.log(‘分享成功’)

console.log(res);

}

}

},

  • 预期表现
  • 复现路径
  • 提供一个最简复现 Demo

功能需要,在分享成功以后请求一个接口,但是并没有执行。

3 回复

你就在分享的 方法里请求方法 就好了。没有成功失败回调了

官方文档也没有回调

https://developers.weixin.qq.com/miniprogram/dev/reference/api/Page.html#onshareappmessageobject-object

并非所有的用户,都喜欢与朋友分享你的小程序。因此,它不应该成为一个诱导或强制行为,如转发后才能解锁某项功能等。请注意,这类做法不仅不被推荐,还可能违反我们的《运营规范》,我们强烈建议你在使用前阅读这部分内容。

代码怎么写的?现在分享没有成功的回调。

回到顶部