h5跳转原生小程序,怎么在原生小程序里面判断是否是从h5跳转过来的
h5跳转原生小程序,怎么在原生小程序里面判断是否是从h5跳转过来的
h5跳转原生小程序,怎么在原生小程序里面判断是否是从h5跳转过来的
不知道你是什么小程序,微信小程序可以通过options的场景值判断
onShow: function (options) {
if (options.scene == 1007) {
// 通过单人聊天会话分享进入
}
if (options.scene == 1008) {
// 通过群聊会话分享进入
}
if (options.scene == 1001) {
// 通过发现栏小程序进入
}
// ......
具体场景值参考:
https://developers.weixin.qq.com/miniprogram/dev/reference/scene-list.html