人脸识别

This commit is contained in:
hanrenchun 2025-06-05 17:17:42 +08:00
parent bb3600c101
commit 01f6f5bbc0
1 changed files with 6 additions and 1 deletions

View File

@ -155,7 +155,12 @@ public class SysLoginController {
String substring = imageFile.substring(imageFile.lastIndexOf("/") + 1, imageFile.lastIndexOf("."));
System.out.println("识别用户为" + substring);
AjaxResult ajax = AjaxResult.success();
String token = loginService.loginAppBySms(substring, substring);
String token = null;
try {
token = loginService.loginAppBySms(substring, substring);
} catch (Exception e) {
return AjaxResult.error("未检测到用户信息");
}
JSONObject resJson = new JSONObject();
resJson.put(Constants.TOKEN, token);
resJson.put("user", substring);