From 561e55b59f52659a32e26b211b386bb7ee02f210 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Fri, 17 Apr 2026 14:55:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=8B=89=E5=8F=96=E4=BA=BA=E8=84=B8v1?= =?UTF-8?q?=E3=80=81v2=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common/api/user_api.dart | 14 ++++++++++++++ lib/common/utils/sync/sync_face_tool.dart | 2 +- lib/common/values/constants.dart | 4 ++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/common/api/user_api.dart b/lib/common/api/user_api.dart index 2078418..f29f277 100644 --- a/lib/common/api/user_api.dart +++ b/lib/common/api/user_api.dart @@ -57,6 +57,20 @@ abstract class UserApi { .toList(); } + /// 获取人脸v2 + static Future?> getFaceListV2( + dynamic formData, + ) async { + final res = await HttpManage().dio.get( + "/admin/user-face/ad/v2/find-face", + queryParameters: formData, + ); + if (res.data == null) return null; + return res.data + ?.map((e) => ServiceAsyncFace.fromJson(e)) + .toList(); + } + /// 获取租户列表 static Future?> getTenantList() async { final res = await HttpManage().dio.get("/admin/tenant/list"); diff --git a/lib/common/utils/sync/sync_face_tool.dart b/lib/common/utils/sync/sync_face_tool.dart index 3ed722c..7b6727d 100644 --- a/lib/common/utils/sync/sync_face_tool.dart +++ b/lib/common/utils/sync/sync_face_tool.dart @@ -71,7 +71,7 @@ class SyncFaceTool { if (isGlobalFace != null && isGlobalFace) pa["merchantDeptId"] = null; logger.i("|$_tag|同步人脸api参数:|$pa|"); try { - final data = await UserApi.getFaceList(pa); + final data = await UserApi.getFaceListV2(pa); if (data == null) throw Error(); if (ObjectUtil.isEmptyList(data)) { if (ObjectUtil.isEmpty(userId)) return false; diff --git a/lib/common/values/constants.dart b/lib/common/values/constants.dart index 75a76fe..bfdf805 100644 --- a/lib/common/values/constants.dart +++ b/lib/common/values/constants.dart @@ -10,9 +10,9 @@ class Constants { static const pwdEncKey = 'pigxpigxpigxpigx'; /// 服务 url 线上 - // static const apiUrl = 'https://stgl.pj.gov.cn/api'; + static const apiUrl = 'https://stgl.pj.gov.cn/api'; - static const apiUrl = 'https://dzc-test-1.fy.takin.cc'; + // static const apiUrl = 'https://dzc-test-1.fy.takin.cc'; /// 静态资源 url static const ossUrl = apiUrl;