feat:超市实体

This commit is contained in:
dzc committed 2025-03-17 15:45:50 +08:00
1 parent 321ae3378a
commit c0fbf652fb
16 files changed
+640 -80

No files matched your search

+16 -6
View File
@@ -43,15 +43,25 @@ abstract class ProductApi {
.toList();
}
/// 超市商品
static Future<List<ServiceProduct>?> supermarketProduct(dynamic pa) async {
final res = await HttpManage().dio.get(
/// 超市 spu
static Future<List<ServiceSupermarketSpuPage>?> supermarketSpu(
dynamic pa) async {
final res = await HttpManage().dio.post(
"supermarket/supermarketSpu/ad/selectListAll",
queryParameters: pa,
);
if (res.data == null) return null;
return res.data
?.map<ServiceProduct>((e) => ServiceProduct.fromJson(e))
.toList();
return res.data?.map((e) => ServiceSupermarketSpuPage.fromJson(e)).toList();
}
/// 超市 spu 详情
static Future<List<ServiceSupermarketSkuPage>?> supermarketSupDetial(
dynamic pa) async {
final res = await HttpManage().dio.get(
"supermarket/supermarketSpu/ad/SpuDetails",
queryParameters: pa,
);
if (res.data == null) return null;
return res.data?.map((e) => ServiceSupermarketSkuPage.fromJson(e)).toList();
}
}