|
|
|
@ -5,15 +5,9 @@
|
|
|
|
|
|
|
|
|
|
<title>QR code reading</title>
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" rel="preload" as="style" onload="this.rel='stylesheet';this.onload=null"
|
|
|
|
|
href="https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">
|
|
|
|
|
<link rel="stylesheet" rel="preload" as="style" onload="this.rel='stylesheet';this.onload=null"
|
|
|
|
|
href="https://unpkg.com/normalize.css@8.0.0/normalize.css">
|
|
|
|
|
<link rel="stylesheet" rel="preload" as="style" onload="this.rel='stylesheet';this.onload=null"
|
|
|
|
|
href="https://unpkg.com/milligram@1.3.0/dist/milligram.min.css">
|
|
|
|
|
<script src="<c:url value="/resources/3rd-party/sneat/libs/jquery/jquery.js"/>"></script>
|
|
|
|
|
|
|
|
|
|
<script src="<c:url value="/resources/js/base/base.js?${ver}"/>"></script>
|
|
|
|
|
<main class="wrapper" style="padding-top:2em">
|
|
|
|
|
|
|
|
|
|
<section class="container" id="demo-content">
|
|
|
|
@ -61,12 +55,14 @@
|
|
|
|
|
</main>
|
|
|
|
|
|
|
|
|
|
<!--<script type="text/javascript" src="https://unpkg.com/@zxing/library@latest/umd/index.min.js"></script>-->
|
|
|
|
|
<script src="<c:url value='/resources/js/zxing-library-0.20.0.min.js' />"></script>
|
|
|
|
|
<%--<script src="<c:url value="/resources/js/base/base.js?${ver}"/>" defer></script>--%>
|
|
|
|
|
<script src="<c:url value='/resources/js/zxing-library-0.20.0.min.js' />" defer></script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
window.addEventListener('load', function () {
|
|
|
|
|
let selectedDeviceId;
|
|
|
|
|
let isScan = false;
|
|
|
|
|
const codeReader = new ZXing.BrowserMultiFormatReader()
|
|
|
|
|
const codeReader = new ZXing.BrowserMultiFormatReader();
|
|
|
|
|
console.log('ZXing code reader initialized')
|
|
|
|
|
console.log('ZXing code reader initialized')
|
|
|
|
|
codeReader.listVideoInputDevices()
|
|
|
|
|
.then((videoInputDevices) => {
|
|
|
|
@ -238,7 +234,7 @@
|
|
|
|
|
console.error(err)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}, {passive: true})
|
|
|
|
|
|
|
|
|
|
function isValid(data) {
|
|
|
|
|
|
|
|
|
|