通过 微信小程序内置的 button组件中的 open-type 属性来实现分享,如下代码:
<button type="primary" open-type="share">分享</button>
效果图: