11
This commit is contained in:
1 parent
295b4058be
commit
08bf352984
21 files changed
+1109
-234
No files matched your search
@@ -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();
|
||||
}
|
||||
|
||||
/// 核销订单
|
||||
|
||||
Reference in new issue
Block a user