From ce49de0e3d228e795090ba11a24b34bb940d6fe3 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期日, 19 十月 2025 21:32:50 +0800
Subject: [PATCH] feat: 1.2.0.1
---
packages/hooks/identify.ts | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/packages/hooks/identify.ts b/packages/hooks/identify.ts
index 49aced2..63b0a62 100644
--- a/packages/hooks/identify.ts
+++ b/packages/hooks/identify.ts
@@ -1,5 +1,6 @@
+import { EnumOcrAccess } from '@12333/constants';
import * as accountServices from '@12333/services/api/Account';
-import * as commonServices from '@12333/services/api/Common';
+import * as ocrUtilsServices from '@12333/services/apiV2/ocrUtils';
import { FileItem } from '@nutui/nutui-taro/dist/types/__VUE/uploader/type';
import _ from 'lodash';
@@ -25,18 +26,23 @@
}
type UserCredentialVerifyOcrIDCardOptions = {
- onSuccess?: (res: API.UserCredentialVerifyOcrIDCardResponse) => any;
+ access?: EnumOcrAccess;
+ scene?: string;
+ isOssUrl?: boolean;
+ url?: string;
+ onSuccess?: (res: API.GetIdentityFrontOcrCommandResult) => any;
};
export async function userCredentialVerifyOcrIDCard(
- response: FileItem,
options: UserCredentialVerifyOcrIDCardOptions = {}
) {
try {
- if (response?.url) {
- const { onSuccess } = options;
- let res = await commonServices.userCredentialVerifyOcrIDCard({
- identityImageUrl: response.url,
+ const { onSuccess, access, isOssUrl, url, scene } = options;
+ if (url) {
+ let res = await ocrUtilsServices.getIdentityFrontOcr({
+ access: access,
+ url: url,
+ isOssUrl: isOssUrl,
});
onSuccess?.(res);
}
--
Gitblit v1.9.1