该二维码通过微信小程序官方的API生成,在原生小程序开发下
wx.scanCode({
onlyFromCamera: true,
success(res) {
console.log(res);
wx.navigateTo({
url: '/pages/device-details/device-details?did=' + res.path.split("=")[1],
})
}
})
res.path 内的会包含所带的参数
在uni-app运行在Android 雷电模拟器下调用扫码
{
"result": "https://mp.weixin.qq.com/a/~~V1F42N5Z8so~q34MmRTOhQN99IldqUw8hA~~",
"charSet": "ISO8859_1",
"path": "",
"scanType": "QR_CODE",
"errMsg": "scanCode:ok"
}
path内不带参数,请问是该如何处理呢
1***@qq.com (作者)
是有生成的,通过原生小程序扫码path包含了一个did
2021-12-08 10:15