//分享到朋友圈
            onShareTimeline() {
                return {
                    title: '鸣火',
                    path: "pages/tabbar/tabbar?share=微信会把分享到朋友圈的参数去掉,别想了!",
                    imageUrl: "../../static/logo.png",
                };
            },
            //发送给朋友
            onShareAppMessage() {
                return {
                    title: '鸣火',
                    path: "pages/tabbar/tabbar?share=" + JSON.stringify(this.list[this.current]),
                    imageUrl: "../../static/logo.png",
                };
            },

 自制分享按钮:

 <view class="box">
   <button class="specialButton" open-type="share"></button>
</view>

  .specialButton { opacity: 0; width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: 100; }

  .box{

    position:relative;

  }

 

 posted on 2022-10-20 17:34  laremehpe  阅读(880)  评论(0编辑  收藏  举报