扫码JSSDK载入
This commit is contained in:
10
dist/index.html
vendored
10
dist/index.html
vendored
@@ -42,7 +42,7 @@
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
display: none;
|
||||
}</style></head><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><pre id="output" class="output"></pre><pre id="result" class="result"></pre><pre id="error" class="error"></pre><br><script>(function (params) {
|
||||
}</style></head><body><h1 style="text-align: center;">IScan</h1><div style="text-align: center;"><button onclick="stopScan()" class="btn">stopScan</button> <button onclick="startScan()" class="btn">startScan</button></div><pre id="output" class="output"></pre><pre id="result" class="result"></pre><pre id="error" class="error"></pre><br><script>(function (params) {
|
||||
output(window.navigator.userAgent);
|
||||
window.onerror = function (params) {
|
||||
error(params);
|
||||
@@ -91,7 +91,7 @@
|
||||
})
|
||||
} else {
|
||||
window.addEventListener("IScanReady", function () {
|
||||
initSDK(callback);
|
||||
initSDK(options, callback);
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -105,6 +105,7 @@
|
||||
webScanBeepEnabled: true,
|
||||
initWechatJssdk: { apiUrl: url }
|
||||
}, function () {
|
||||
result("初始化成功");
|
||||
IScan.setStatusListener(function (res) {
|
||||
output("status", IScan.getStatus());
|
||||
});
|
||||
@@ -112,7 +113,6 @@
|
||||
result(res);
|
||||
}, "scan", null, 100);
|
||||
output(window.navigator.userAgent);
|
||||
result("初始化成功");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -126,4 +126,6 @@
|
||||
output("call startScan");
|
||||
hide();
|
||||
IScan.startScan();
|
||||
}</script><script src="index.js"></script></body></html>
|
||||
}
|
||||
|
||||
ready();</script><script src="index.js"></script></body></html>
|
||||
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user