美文网首页
微信小程序 scene参数识别获取

微信小程序 scene参数识别获取

作者: 安徒生1997 | 来源:发表于2021-05-01 17:39 被阅读0次

1.单个参数:

let scene = decodeURIComponent(options.scene);

let pid = scene.split('=')[1];

2.多个参数:

let scene = decodeURIComponent(options.scene);

//-是我们分隔参数的方式

let productId = scene.split("-")[0];

let spikeId = scene.split('-')[1];

相关文章

网友评论

      本文标题:微信小程序 scene参数识别获取

      本文链接:https://www.haomeiwen.com/subject/sqzarltx.html