This commit is contained in:
dzc committed 2025-03-09 20:35:03 +08:00
1 parent 295b4058be
commit 08bf352984
21 files changed
+1109 -234

No files matched your search

+7 -11
View File
@@ -70,29 +70,25 @@ abstract class HardApi {
}
/// 获取订单详情
static Future<ServiceBase> getOrder(dynamic formData) async {
final res = await HttpManage().dio.get<ServiceBase>(
static Future<ServiceHardOrder?> getOrder(dynamic formData) async {
final res = await HttpManage().dio.get(
"/hard/hard-api/ad/get-order",
queryParameters: formData,
);
return res.data as ServiceBase;
if (res.data == null) return null;
return ServiceHardOrder.fromJson(res.data);
}
/// 获取订单购物车
static Future<ServiceListBase<ServiceCar>> getCarByOrderId(
static Future<List<ServiceCar>?> getCarByOrderId(
dynamic formData,
) async {
final res = await HttpManage().dio.get(
"/hard/hard-api/ad/get-by-order-id",
queryParameters: formData,
);
if (res.data?.data == null) {
return res.data!;
}
final typeData =
res.data?.data?.map<ServiceCar>((e) => ServiceCar.fromJson(e)).toList();
res.data?.data = typeData;
return res.data!;
if (res.data == null) return null;
return res.data?.map<ServiceCar>((e) => ServiceCar.fromJson(e)).toList();
}
/// 核销订单
+3 -7
View File
@@ -44,20 +44,16 @@ abstract class UserApi {
}
/// 获取人脸
static Future<ServiceListBase<ServiceAsyncFace>> getFaceList(
static Future<List<ServiceAsyncFace>?> getFaceList(
dynamic formData,
) async {
final res = await HttpManage().dio.get(
"/admin/user-face/ad/find-face",
queryParameters: formData,
);
if (res.data?.data == null) {
return res.data;
}
final typeData = res.data?.data
if (res.data == null) return null;
return res.data
?.map<ServiceAsyncFace>((e) => ServiceAsyncFace.fromJson(e))
.toList();
res.data?.data = typeData;
return res.data;
}
}
+4 -2
View File
@@ -11,13 +11,15 @@ abstract class WalletApi {
}
/// 开卡列表
static Future<ServiceBase?> openCardList(dynamic pa) async {
static Future<ServiceOpenCardPage?> openCardList(
dynamic pa,
) async {
final res = await HttpManage().dio.get(
"/wallet/wallet-active/ad/open-card-list",
queryParameters: pa,
);
if (res.data == null) return null;
return res.data as ServiceBase;
return ServiceOpenCardPage.fromJson(res.data);
}
/// 开卡成功