为什么扫描二维码获取不到scene参数值问题?
在微信开发工具模拟扫描生成的商品二维码进入页面:
根据文档所说:
调试阶段可以使用开发工具的条件编译自定义参数 scene=xxxx 进行模拟,开发工具模拟时的 scene 的参数值需要进行 encodeURIComponent
onLoad: function (options) { console.log(encodeURIComponent(options.scene))} |
打印出来是id?为什么?
这是生成二维码的参数不知道有没有问题:
let params = { "scene": `id=${id}&title=${'goods'}`, "page": "pages/information/information"} |
