官网文档:https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html第一种情况 点击小程序转发不加入参数 //转发 onShareAppMessage: function() { let users = wx.getStorageSync(‘user’); if (res.from === ‘button’) {} return { title: ‘转发’, path: ‘/pages/index/index’, success: function(res) {} } }加入参数 //转发 onShareAppMessage: function() { let users = wx.getStorageSync(‘user’); if (res.from === ‘button’) {} return { title: ‘转发’, path: ‘/pages/index/index?from_uid=’ + users.id, success: function(res) {} } } 第二种 分享这个分享必须做成button 且加上 open-type=”share”不加入参数 onShareAppMessage: function (res) { if (res.from === ‘button’) { } return { title: ‘转发’, path: ‘/pages/index/community/topic/topic’, success: function (res) { console.log(‘成功’, res) } } }加入参数 //转发 onShareAppMessage: function (res) { if (res.from === ‘button’) { } return { title: ‘转发’, path: ‘/pages/index/community/topic/topic?jsonStr=’ + this.data.list, success: function (res) { console.log(‘成功’, res) } } }提醒:这里转发的参数要在onLoad 的options 运用
微信小程序转发分享功能
未经允许不得转载:E企盈小程序开发-热线:4006-838-530 » 微信小程序转发分享功能
最新评论
独特万商直播系统,直播系统技术开发公司
万商直播系统开发公司
优秀的团队,万商直播管理系统
不错的小程序案例
优秀的团队,不错的服务!
讲的很好
主播长的帅气
好系统好服务