html52.com
我爱小程序-开发者交流社区

onShareAppMessage方法分享出去没有标题?

通过onShareAppMessage方法分享出去没有标题,通过右上角分享出去有标题

通过onShareAppMessage方法分享出去没有标题,通过右上角分享出去有标题代码如下:

通过onShareAppMessage方法分享出去没有标题,通过右上角分享出去有标题代码如下:

代码如下:

 <button bindtap='onShareAppMessage' open-type="share">转发给好友</button>
/**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {


  }

网友回复

心心情:

标题需要在分享事件onShareAppMessage()定义的。目前没有配置标题的话,点击右上角“转发”分享标题默认是小程序名称,页面按钮分享是空,是不一致的。

默认²⁰²⁰:

写下面的代码就有了

写下面的代码就有了卡布达:手动添加title试试? onShareAppMessage: function () {    return {      tit

卡布达:

手动添加title试试?

onShareAppMessage: function () {

    return {

      title: "",

      path: ""

    }

}


citizen four:
onShareAppMessage:function() {
        return {
            title: '分享标题',
            imageUrl: '分享图片',
            path: "分享路径"
        };
    },

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付