小程序分享带参数
wxml部分
<button open-type="share">分享名片</button>
js部分
onShareAppMessage:function(e){
return{
title:'*****',
path:"pages/index/index?id=" + 1+"&popenid="+2,
success: function (res) {
// 转发成功
console.log('转发成功')
},
fail: function (res) {
// 转发失败
console.log('转发失败')
}
}
},
接收分享带的参数
onLoad: function (options) {
console.log(options)
}