qsh-webview-sdk 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -7
- package/dist/index.d.ts +41 -2
- package/dist/qsh-webview-sdk.es.js +659 -559
- package/dist/qsh-webview-sdk.es.js.map +1 -1
- package/dist/qsh-webview-sdk.umd.js +1 -1
- package/dist/qsh-webview-sdk.umd.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -674,14 +674,10 @@ qsh.chooseLocation({
|
|
|
674
674
|
```javascript
|
|
675
675
|
// 人脸核身(小程序/APP)
|
|
676
676
|
qsh.faceVerify({
|
|
677
|
-
verifyType: 'idcard', // 核身类型:idcard, bankcard, driver
|
|
678
|
-
idCard: '身份证号',
|
|
679
677
|
name: '姓名',
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
},
|
|
684
|
-
fail: (err) => console.error(err)
|
|
678
|
+
idCardNumber: '身份证号',
|
|
679
|
+
title: '人脸核身',
|
|
680
|
+
url: 'https://example.com/face-result'
|
|
685
681
|
});
|
|
686
682
|
```
|
|
687
683
|
|
package/dist/index.d.ts
CHANGED
|
@@ -289,6 +289,38 @@ declare namespace UniWebView {
|
|
|
289
289
|
isProd?: boolean;
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
+
/**
|
|
293
|
+
* 人脸识别选项(仅支持微信小程序环境)
|
|
294
|
+
* 只发送请求,不返回任何结果给调用者
|
|
295
|
+
*/
|
|
296
|
+
interface FaceVerifyOptions {
|
|
297
|
+
/** 姓名(必填) */
|
|
298
|
+
name: string;
|
|
299
|
+
/** 身份证号(必填) */
|
|
300
|
+
idCardNumber: string;
|
|
301
|
+
/** 标题(必填) */
|
|
302
|
+
title: string;
|
|
303
|
+
/** 之后打开的url(必填) */
|
|
304
|
+
url: string;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* 人脸识别功能能力信息
|
|
309
|
+
*/
|
|
310
|
+
interface FaceCapabilities {
|
|
311
|
+
/** 是否支持人脸识别(仅微信小程序环境返回 true) */
|
|
312
|
+
supported: boolean;
|
|
313
|
+
/** 当前环境类型 */
|
|
314
|
+
environment: string;
|
|
315
|
+
/** 底层实现类型,固定为 'weixin' */
|
|
316
|
+
implementation: "weixin";
|
|
317
|
+
/** 功能特性 */
|
|
318
|
+
features: {
|
|
319
|
+
/** 支持 Promise */
|
|
320
|
+
asyncSupport: boolean;
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
|
|
292
324
|
interface WeixinNamespace {
|
|
293
325
|
config(options: QshConfigOptions): QshConfigOptions;
|
|
294
326
|
waitForConfig(): Promise<void>;
|
|
@@ -297,7 +329,6 @@ declare namespace UniWebView {
|
|
|
297
329
|
retryConfig(): Promise<void>;
|
|
298
330
|
}
|
|
299
331
|
|
|
300
|
-
|
|
301
332
|
/**
|
|
302
333
|
* WebView 对象接口
|
|
303
334
|
*/
|
|
@@ -326,7 +357,7 @@ declare namespace UniWebView {
|
|
|
326
357
|
webView: WebView | null;
|
|
327
358
|
|
|
328
359
|
weixin: WeixinNamespace;
|
|
329
|
-
|
|
360
|
+
|
|
330
361
|
/** 图片选择(Promise版本) */
|
|
331
362
|
chooseImageAsync(
|
|
332
363
|
options?: Omit<ChooseImageOptions, "success" | "fail" | "complete">,
|
|
@@ -375,6 +406,14 @@ declare namespace UniWebView {
|
|
|
375
406
|
/** 获取打印PDF功能能力信息 */
|
|
376
407
|
getPrintCapabilities(): PrintPdfCapabilities;
|
|
377
408
|
|
|
409
|
+
/**
|
|
410
|
+
* 人脸识别(仅支持微信小程序环境)
|
|
411
|
+
* 只发送请求,不返回任何结果给调用者
|
|
412
|
+
*/
|
|
413
|
+
faceVerify(options: FaceVerifyOptions): void;
|
|
414
|
+
/** 获取人脸识别功能能力信息 */
|
|
415
|
+
getFaceCapabilities(): FaceCapabilities;
|
|
416
|
+
|
|
378
417
|
/** 观测指标 */
|
|
379
418
|
metrics: {
|
|
380
419
|
getPerformanceReport(): Record<string, any>;
|