优化
This commit is contained in:
4
dist/index.d.ts
vendored
4
dist/index.d.ts
vendored
@@ -45,6 +45,10 @@ interface ScanConfigOptions {
|
||||
* 网页扫码canvas样式,默认:position: fixed; width: 300px; height: 300px; top: 0; left: 0; z-index: 9999;
|
||||
*/
|
||||
webScanCanvasStyle?: string,
|
||||
/**
|
||||
* 网页扫码canvas关闭按钮样式,默认显示在canvas右上角
|
||||
*/
|
||||
webScanCloseButtonStyle?: string,
|
||||
/**
|
||||
* 网页扫码类型,默认支持二维码和条码
|
||||
*/
|
||||
|
||||
2
dist/index.html
vendored
2
dist/index.html
vendored
@@ -164,6 +164,7 @@
|
||||
}</style></head><body><main class="page"><section class="hero"><h1>IScan 通用扫码SDK</h1><p>统一接入桥接扫码、微信小程序、微信 JSSDK 扫码、Web 摄像头扫码、图片识别和扫码枪输入。</p></section><section class="grid"><div class="card"><h2>功能说明</h2><ul class="feature-list"><li>支持桥接扫码、微信 JSSDK 扫码、Web 摄像头扫码、图片识别和扫码枪输入。</li><li>浏览器环境使用WASM库识别二维码和条形码。</li><li>扫码结果由监听规则统一回调,支持正则匹配和优先级排序。</li></ul></div><div class="card"><h2>当前状态</h2><p>SDK 状态:<span id="status" class="status">loading</span></p><p>运行环境:</p><pre id="output" class="panel"></pre></div></section><section class="card"><h2>操作</h2><p>点击开始后,会按桥接、微信、Web 摄像头、图片识别的顺序选择可用扫码方式。</p><div class="actions"><button onclick="startScan()" class="btn">开始扫码</button> <button onclick="scanVideo()" class="btn secondary">开启视频扫码</button> <button onclick="scanImage()" class="btn secondary">选择图片识别</button> <button onclick="stopScan()" class="btn secondary">停止扫码</button></div></section><section class="card"><h2>扫码结果</h2><pre id="result" class="panel result"></pre></section><section class="card"><h2>错误信息</h2><pre id="error" class="panel error"></pre><p style="color: #919191">错误信息可能来源于扫码结果、扫码过程、扫码初始化等。</p></section><section class="card code"><h2>接入方式</h2><pre>IScan.config({
|
||||
webScanEnabled: true,
|
||||
webScanCanvasEnabled: true,
|
||||
webScanCloseButtonStyle: "background: rgba(27, 99, 244, 0.88);",
|
||||
webScanBeepEnabled: true,
|
||||
initWechatJssdk: {
|
||||
apiUrl: "https://your-domain.com/wechat/jssdk-config"
|
||||
@@ -249,6 +250,7 @@ IScan.stopScan();</pre></section></main><script>(function () {
|
||||
var url = "https://vet.iqudoo.com/api?action=api.biz.wechat.JSSDKConfig";
|
||||
initSDK({
|
||||
webScanCanvasEnabled: true,
|
||||
webScanCloseButtonStyle: "background: rgba(27, 99, 244, 0.88);",
|
||||
webScanBeepEnabled: true,
|
||||
initWechatJssdk: { apiUrl: url }
|
||||
}, function () {
|
||||
|
||||
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