云开发函数 取得小程序二维码,scene 下面的设置对么?
预想动作是,当扫描二维码进入到 recruitDetail 页面的onload 方法里面
用e.postId 取得这个参数
await cloud.openapi.wxacode.getUnlimited({
scene: `postId=${id}`,
width: 1280,
page: 'Userpackage/recruitDetail/recruitDetail'
})
scene不能含'='。改成:
scene:'xxx'
扫描后我看到页面的url 是 page.html?scene=xxx 了,
但是页面没有显示数据,本地调试传过去scene 参数是正常的,奇怪了,扫二维码能debug 调试么?谢谢!
官方给的例子是:
const result = await cloud.openapi.wxacode.getUnlimited({ "scene": 'a=1' })
onload 时直接 e.a 还是e.scene 读取(a=1)呢?
参考文档https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/qr-code/wxacode.getUnlimited.html