收藏
回答

群分享后,怎么返回上一页?

回答关注问题邀请回答
收藏

1 个回答

  • o0o有脾气的酸奶
    o0o有脾气的酸奶
    2019-11-30

    可以实现,但是无法保证用户真的分享了,只能保证用户点击了【分享到群】按钮

    <button open-type="share" bindtap="share">分享到群</button>

    Page({

        data: {},

        onLoad: function () {

            this.isTapShare = !1

        },

        onShow: function() {

            if (this.isTapShare) {

                this.isTapShare = !1

                wx.navigateBack()

            }

        },

        share: function(e){

            this.isTapShare = !0

        },

        onShareAppMessage: (resMessage) => {

            return {

                title: '首页分享',

                path: 'index/index'

            }

        }

    })


    2019-11-30
    有用
    回复
登录 后发表内容
问题标签