主页 > 互联网  > 

微信小程序获取来源场景值


https://developers.weixin.qq.com/miniprogram/dev/framework/app-service/scene.html#返回来源信息的场景 https://developers.weixin.qq.com/miniprogram/dev/api/base/app/life-cycle/wx.getLaunchOptionsSync.html 场景值列表

只有1008是来源群聊

/** * 生命周期函数--监听页面显示 */ onShow() { const launchOps = wx.getLaunchOptionsSync(); console.error(launchOps); if (launchOps.scene === 1008) { this.setData({ isFromGroup: true }) } },
标签:

微信小程序获取来源场景值由讯客互联互联网栏目发布,感谢您对讯客互联的认可,以及对我们原创作品以及文章的青睐,非常欢迎各位朋友分享到个人网站或者朋友圈,但转载请说明文章出处“微信小程序获取来源场景值