优化:支持控制是否显示
This commit is contained in:
41
dist/index.d.ts
vendored
41
dist/index.d.ts
vendored
@@ -6,6 +6,22 @@ interface ScanConfigOptions {
|
||||
* 网页扫码canvas样式
|
||||
*/
|
||||
webCanvasStyle?: string,
|
||||
/**
|
||||
* 网页扫码类型,默认支持二维码和条码
|
||||
*/
|
||||
webScanType?: ('qrCode' | 'barCode')[],
|
||||
/**
|
||||
* 网页扫码canvas是否启用,默认启用
|
||||
*/
|
||||
webCanvasEnabled?: boolean,
|
||||
/**
|
||||
* 网页扫码成功提示音地址,默认使用内置提示音
|
||||
*/
|
||||
webScanBeepAudio?: string,
|
||||
/**
|
||||
* 网页扫码成功提示音是否启用,默认启用
|
||||
*/
|
||||
webScanBeepEnabled?: boolean,
|
||||
/**
|
||||
* 微信JSSDK配置,微信环境才会生效,配置后会自动初始化微信JSSDK
|
||||
*/
|
||||
@@ -14,6 +30,31 @@ interface ScanConfigOptions {
|
||||
* 微信JSSDK配置API地址,调用接口会带上当前页面url作为参数
|
||||
*/
|
||||
apiUrl: string,
|
||||
/**
|
||||
* 微信JSSDK配置参数,不配置则自动获取
|
||||
*/
|
||||
sdkConfig?: {
|
||||
/**
|
||||
* 是否开启调试模式
|
||||
*/
|
||||
debug?: boolean,
|
||||
/**
|
||||
* 微信公众平台应用ID
|
||||
*/
|
||||
appId: string,
|
||||
/**
|
||||
* 时间戳
|
||||
*/
|
||||
timestamp: number,
|
||||
/**
|
||||
* 随机字符串
|
||||
*/
|
||||
nonceStr: string,
|
||||
/**
|
||||
* 签名
|
||||
*/
|
||||
signature: string,
|
||||
},
|
||||
/**
|
||||
* 微信JSSDK配置SDK地址,默认为https://res.wx.qq.com/open/js/jweixin-1.6.0.js
|
||||
*/
|
||||
|
||||
6
dist/index.html
vendored
6
dist/index.html
vendored
@@ -100,7 +100,11 @@
|
||||
output("call ready");
|
||||
hide();
|
||||
var url = "https://vet.iqudoo.com/api?action=api.biz.wechat.JSSDKConfig";
|
||||
initSDK({ initWechatJssdk: { apiUrl: url } }, function () {
|
||||
initSDK({
|
||||
webCanvasEnabled: true,
|
||||
webScanBeepEnabled: true,
|
||||
initWechatJssdk: { apiUrl: url }
|
||||
}, function () {
|
||||
IScan.setStatusListener(function (res) {
|
||||
output("status", IScan.getStatus());
|
||||
});
|
||||
|
||||
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