//open-type="share"触发用户转发,使用前建议先阅读 会触发下面的onShareAppMessage()方法
<button open-type="share">
<text >分享给朋友</text>
</button>
//这个API是固定
onShareAppMessage() {
return {
//标题
title: '查看通行证',
// 点进来访问的页面
path: '/visitor_pkg/pages/passport/index',
//你展示的图片
imageUrl: 'https://enjoy-plus.oss-cn-beijing.aliyuncs.com/images/share_poster.png',
}
},
原生小程序如何转发?
于 2023-07-05 20:29:23 首次发布