uniapp一个页面分享多个页面

<button data-name="f1" class="b1" open-type="share">
分享链接
</button>

 <button data-name="f2" class="b1" open-type="share">
分享链接
</button>

onShareAppMessage(res) 

 

res.target.dataset.name

 

if (res.from === 'button') { // 来自页面内分享按钮

  if (res.target.dataset.name == "f1") {

       }

  else if (res.target.dataset.name == "f2") {

       }

}

posted @ 2021-10-13 17:04  何云泽  阅读(487)  评论(0)    收藏  举报