qsh-webview-sdk 2.0.9 → 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 +762 -748
- package/dist/index.d.ts +56 -0
- package/dist/qsh-webview-sdk.es.js +1111 -858
- 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/dist/index.d.ts
CHANGED
|
@@ -284,6 +284,51 @@ declare namespace UniWebView {
|
|
|
284
284
|
};
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
+
interface QshConfigOptions {
|
|
288
|
+
clientId: string;
|
|
289
|
+
isProd?: boolean;
|
|
290
|
+
}
|
|
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
|
+
|
|
324
|
+
interface WeixinNamespace {
|
|
325
|
+
config(options: QshConfigOptions): QshConfigOptions;
|
|
326
|
+
waitForConfig(): Promise<void>;
|
|
327
|
+
isConfigReady(): boolean;
|
|
328
|
+
getConfigState(): string;
|
|
329
|
+
retryConfig(): Promise<void>;
|
|
330
|
+
}
|
|
331
|
+
|
|
287
332
|
/**
|
|
288
333
|
* WebView 对象接口
|
|
289
334
|
*/
|
|
@@ -307,9 +352,12 @@ declare namespace UniWebView {
|
|
|
307
352
|
environment: Environment;
|
|
308
353
|
/** 等待桥接准备就绪 */
|
|
309
354
|
ready(): Promise<void>;
|
|
355
|
+
config(options: QshConfigOptions): QshConfigOptions;
|
|
310
356
|
/** WebView 对象(兼容旧版本) */
|
|
311
357
|
webView: WebView | null;
|
|
312
358
|
|
|
359
|
+
weixin: WeixinNamespace;
|
|
360
|
+
|
|
313
361
|
/** 图片选择(Promise版本) */
|
|
314
362
|
chooseImageAsync(
|
|
315
363
|
options?: Omit<ChooseImageOptions, "success" | "fail" | "complete">,
|
|
@@ -358,6 +406,14 @@ declare namespace UniWebView {
|
|
|
358
406
|
/** 获取打印PDF功能能力信息 */
|
|
359
407
|
getPrintCapabilities(): PrintPdfCapabilities;
|
|
360
408
|
|
|
409
|
+
/**
|
|
410
|
+
* 人脸识别(仅支持微信小程序环境)
|
|
411
|
+
* 只发送请求,不返回任何结果给调用者
|
|
412
|
+
*/
|
|
413
|
+
faceVerify(options: FaceVerifyOptions): void;
|
|
414
|
+
/** 获取人脸识别功能能力信息 */
|
|
415
|
+
getFaceCapabilities(): FaceCapabilities;
|
|
416
|
+
|
|
361
417
|
/** 观测指标 */
|
|
362
418
|
metrics: {
|
|
363
419
|
getPerformanceReport(): Record<string, any>;
|