// 允许从相机和相册扫码 wx.scanCode({ success (res) { console.log(res) } }) // 只允许从相机扫码 wx.scanCode({ onlyFromCamera: true, success (res) { console.log(res) } })
数据格式
{
charSet: "utf-8",
codeVersion: 3,
errMsg: "scanCode:ok",
rawData: "",
result: "",
scanType: "QR_CODE"
}
本文作者为gengboxb,转载请注明。