From 7326f36860d3a7d5355bd2f7546f905010a8fb6f Mon Sep 17 00:00:00 2001
From: 移动系统liao <liaoxujun@qq.com>
Date: 星期一, 19 八月 2024 15:06:06 +0800
Subject: [PATCH] 增加企业执照文件,身份证文件验证上传,增加人脸特征上传
---
cylsg/EzTencentCloud/TencentCloudService.cs | 70 +++++++++++++++++++++++++++++++++++
1 files changed, 70 insertions(+), 0 deletions(-)
diff --git a/cylsg/EzTencentCloud/TencentCloudService.cs b/cylsg/EzTencentCloud/TencentCloudService.cs
index b192d1f..1f80d16 100644
--- a/cylsg/EzTencentCloud/TencentCloudService.cs
+++ b/cylsg/EzTencentCloud/TencentCloudService.cs
@@ -117,6 +117,45 @@
}
+
+
+
+ public BizLicenseOCRResponse BizLicenseOCR(string ImageBase64)
+ {
+ try
+ {
+
+ Credential cred = new Credential
+ {
+ SecretId = App.Configuration["TencentCloud:SecretId"] ?? "AKIDIPFp9CyThfMmvoQlpeCl34pKYVBahY9T",
+ SecretKey = App.Configuration["TencentCloud:SecretKey"] ?? "4rNcaHhrkMhmb9QQ9bmgKipfFZcOt86n"
+ };
+
+ ClientProfile clientProfile = new ClientProfile();
+ HttpProfile httpProfile = new HttpProfile();
+
+
+ httpProfile.Endpoint = ("ocr.tencentcloudapi.com");
+ clientProfile.HttpProfile = httpProfile;
+
+ var _ocrClient = new OcrClient(cred, "ap-chengdu", clientProfile);
+
+ var ret = _ocrClient.BizLicenseOCRSync(new BizLicenseOCRRequest()
+ {
+ ImageBase64 = ImageBase64,
+ });
+
+ return ret;
+ }
+ catch (Exception)
+ {
+ throw;
+ }
+
+
+ }
+
+
#endregion
#region iai 浜鸿劯璇嗗埆
@@ -236,6 +275,37 @@
}
+
+
+ public VerifyFaceResponse VerifyFace(string img64, string PersonNameId)
+ {
+ Credential cred = new Credential
+ {
+ SecretId = App.Configuration["TencentCloud:SecretId"] ?? "AKIDIPFp9CyThfMmvoQlpeCl34pKYVBahY9T",
+ SecretKey = App.Configuration["TencentCloud:SecretKey"] ?? "4rNcaHhrkMhmb9QQ9bmgKipfFZcOt86n"
+ };
+
+ ClientProfile clientProfile = new ClientProfile();
+ HttpProfile httpProfile = new HttpProfile();
+
+
+ httpProfile.Endpoint = ("iai.tencentcloudapi.com");
+ clientProfile.HttpProfile = httpProfile;
+ var iaiClient = new IaiClient(cred, "ap-chengdu", clientProfile);
+ var ret = iaiClient.VerifyFaceSync(new TencentCloud.Iai.V20200303.Models.VerifyFaceRequest
+ {
+
+ PersonId = PersonNameId,
+ Image= img64
+
+
+
+ });
+ return ret;
+
+
+
+ }
#endregion
}
--
Gitblit v1.9.1