扫码JSSDK载入

This commit is contained in:
iqudoo
2026-04-30 15:16:11 +08:00
parent 4a27189ad4
commit 6b27975a45
6 changed files with 28 additions and 18 deletions

View File

@@ -61,7 +61,6 @@
<body>
<h1 style="text-align: center;">IScan</h1>
<div style="text-align: center;">
<button onclick="ready()" class="btn">ready</button>
<button onclick="stopScan()" class="btn">stopScan</button>
<button onclick="startScan()" class="btn">startScan</button>
</div>
@@ -120,7 +119,7 @@
})
} else {
window.addEventListener("IScanReady", function () {
initSDK(callback);
initSDK(options, callback);
})
}
}
@@ -134,6 +133,7 @@
webScanBeepEnabled: true,
initWechatJssdk: { apiUrl: url }
}, function () {
result("初始化成功");
IScan.setStatusListener(function (res) {
output("status", IScan.getStatus());
});
@@ -141,7 +141,6 @@
result(res);
}, "scan", null, 100);
output(window.navigator.userAgent);
result("初始化成功");
});
}
@@ -157,6 +156,8 @@
IScan.startScan();
}
ready();
</script>
</body>