From d723d5c1413bb38ceb7d7404f4817e6540c3c2a0 Mon Sep 17 00:00:00 2001 From: yanjinhui <3306209981@qq.com> Date: 星期四, 12 六月 2025 16:18:33 +0800 Subject: [PATCH] 人脸识别 --- project/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserFaceService.cs | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/project/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserFaceService.cs b/project/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserFaceService.cs index 71addb8..a157c22 100644 --- a/project/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserFaceService.cs +++ b/project/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_UserFaceService.cs @@ -73,12 +73,12 @@ } else { - return WebResponseContent.Instance.Error("鏈壘鍒板尮閰嶇殑鐢ㄦ埛淇℃伅"); + return WebResponseContent.Instance.Error($"鏈壘鍒板尮閰嶇殑鐢ㄦ埛淇℃伅,{result}"); } } else { - return WebResponseContent.Instance.Error("鏈壘鍒板尮閰嶇殑浜鸿劯淇℃伅"); + return WebResponseContent.Instance.Error($"鏈壘鍒板尮閰嶇殑浜鸿劯淇℃伅,{result}"); } } else @@ -111,6 +111,8 @@ }; } + string str = Environment.CurrentDirectory; + byte[] data = Convert.FromBase64String(model.Base64Image); string basePath = AppDomain.CurrentDomain.BaseDirectory + "Record\\"; if (!Directory.Exists(basePath)) @@ -119,9 +121,9 @@ } string curPath = AppDomain.CurrentDomain.BaseDirectory + "Current\\"; - if (!Directory.Exists(basePath)) + if (!Directory.Exists(curPath)) { - Directory.CreateDirectory(basePath); + Directory.CreateDirectory(curPath); } string fileName = $"face_{DateTime.Now.ToString("yyyyMMddHHmmssfff")}.jpg"; -- Gitblit v1.9.3