Browse Source

扫码测试

lwx_v6
liwenxuan 10 months ago
parent
commit
a5b05bbfc9
  1. 7
      src/views/home/scanQrCode.vue

7
src/views/home/scanQrCode.vue

@ -71,6 +71,9 @@
}, },
(decodedText, decodedResult) => { (decodedText, decodedResult) => {
window.location.href = decodedText; window.location.href = decodedText;
if (state.html5QrCode&&state.html5QrCode.isScanning) {
stop();
}
console.log("decodedText", decodedText); console.log("decodedText", decodedText);
console.log("decodedResult", decodedResult); console.log("decodedResult", decodedResult);
} }
@ -107,6 +110,9 @@
}; };
const clickBack = () => { const clickBack = () => {
//console.log(1) //console.log(1)
if (state.html5QrCode&&state.html5QrCode.isScanning) {
stop();
}
router.back(); router.back();
} }
const getCameras = () => { const getCameras = () => {
@ -118,6 +124,7 @@
} }
}) })
.catch((err) => { .catch((err) => {
console.log(err)
alert("摄像头无访问权限!"); alert("摄像头无访问权限!");
}); });
}; };

Loading…
Cancel
Save