自定义分享图片
onShareAppMessage: (res) => {
if (res.from === 'button') {
console.log("来自页面内转发按钮");
console.log(res.target);
}
else {
console.log("来自右上角转发菜单")
}
return {
title: '21天攻克考研长难句',
path: '/pages/index/index?id=123',
imageUrl: "/images/1.jpg",
success: (res) => {
console.log("转发成功", res);
},
fail: (res) => {
console.log("转发失败", res);
}
}
在转发中,将缩略图改为自定义图片。
欢迎关注,有问题一起学习欢迎留言、评论。
你要保守你心,胜过保守一切。
作者:刘俊涛的博客