微信小程序自定义分享

我是自定义按钮分享的,但是我分享给朋友,朋友打开后就提示页面不存在,不知道是什么原因,求大神指点

在这里插入图片描述
onShareAppMessage: (res) => {
openid = wx.getStorageSync(“openid”)
if (res.from === ‘button’) {
var index = res.target.id;
var id = list[index].list_id;
var flag = list[index].flag
var ticket_discount = list[index].ticket_discount
var ticket_price = list[index].ticket_price
var ticket_money = list[index].ticket_money
var create_time = list[index].create_time
var end_time = list[index].end_time
var profit = list[index].profit
console.log(openid);
}
return {
title: ‘分享’,
path: ‘pages/get/get?openid=’ + openid + ‘&id=’ + id + ‘&flag=’ + flag + ‘&ticket_discount=’ + ticket_discount + ‘&ticket_money=’ + ticket_money + ‘&ticket_price=’ + ticket_price + ‘&create_time=’ + create_time + ‘&end_time=’ + end_time + ‘&profit=’ + profit,
imageUrl: “/images/1.jpg”,
success: (res) => {
console.log(“转发成功”, res);
},
fail: (res) => {
console.log(“转发失败”, res);
}
}
},

猜你喜欢

转载自blog.csdn.net/qq_43255587/article/details/88778199
今日推荐