收藏
回答

onShareAppMessage 的 from 无效?

小程序新的版本onShareAppMessage 里面有 from 判断,下面是小程序手册里面的描述,但我加了from 后 报错,说from没定义?!


Page({
  onShareAppMessage: function (res) {
    if (res.from === 'button') {
      // 来自页面内转发按钮
      console.log(res.target)
    }
    return {
      title: '自定义转发标题',
      path: '/page/user?id=123',
      success: function(res) {
        // 转发成功
      },
      fail: function(res) {
        // 转发失败
      }
    }
  }
})

回答关注问题邀请回答
收藏

1 个回答

  • 工号 9527
    工号 9527
    2017-06-22

    看一下基础库版本

    2017-06-22
    有用
    回复
登录 后发表内容