uniapp 微信小程序分享页面

<button open-type="share" v-bind:data-student="item" class="share">
分享
</button>

指定按钮的类型open-type="share"

分享需要的信息要使用v-bind:data-student传递,这里student是自己命名。

 

onShareAppMessage(event) {
console.log(event);
return {
title: event.target.dataset.student.username + "的测试报告",
path: "/pages_report/share/main/main?stuid=" +
event.target.dataset.student.stuid + "&tabIndex=1",
imageUrl: "../../../static/images/share/share_report.png",
}

}
},

posted @   干红  阅读(607)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 提示词工程——AI应用必不可少的技术
· 字符编码:从基础到乱码解决
· 地球OL攻略 —— 某应届生求职总结
点击右上角即可分享
微信分享提示