button组件自带了一些功能,分享这个功能也是自带的,如下:button的open-type属性

 将button的open-type属性设置为:share即可,这里注意:分享的图片内容是小程序自动截图当前页面生成的,如有用户隐私请做好隐藏。

 

 

<button open-type='share'>分享好友</button>

 

TAG标签: 微信小程序不让好友看到我微信号

http://www.xiaochengxub.com/read-106797.html