人脸识别领料

This commit is contained in:
李超 2025-09-06 14:38:16 +08:00
parent 04a0762978
commit e6b5e14978
1 changed files with 3 additions and 3 deletions

View File

@ -159,7 +159,7 @@
}
if (!string.IsNullOrEmpty(person.PhotoUrl))
{
imgPhoto1.ImageUrl = person.PhotoUrl;
imgPhoto1.ImageUrl = "~/" + person.PhotoUrl;
}
}
else
@ -260,7 +260,7 @@
public string PersonFace(Model.HJGL_BS_Welder person)
{
string message = string.Empty;
string filePath = Server.MapPath(person.PhotoUrl);
string filePath = Server.MapPath("~/")+person.PhotoUrl;
List<SgManager.AI.faceResult> kqFace = null;
try
{
@ -336,7 +336,7 @@
else message = "识别不到人脸";
if (isOK)
{
var faceResult = FaceClass.add(person.WED_ID, person.IdentityCard, System.Configuration.ConfigurationManager.AppSettings["HJGLUrl"].ToString() + person.PhotoUrl.Replace("~\\", "").Replace("\\","/"), AccessToken.getAccessToken());
var faceResult = FaceClass.add(person.WED_ID, person.IdentityCard, System.Configuration.ConfigurationManager.AppSettings["HJGLUrl"].ToString()+ person.PhotoUrl.Replace("~\\", "").Replace("\\","/"), AccessToken.getAccessToken());
var face = JsonConvert.DeserializeObject<dynamic>(faceResult);
// JsonConvert.DeserializeObject<dynamic>(myPunishItem);
if (face.error_code == 0 || face.error_code == 223105)