feat:消费机支付卡顿的问题
This commit is contained in:
1 parent
531815517a
commit
6ec171d262
21 files changed
+1470
-98
No files matched your search
@@ -1,15 +1,21 @@
|
||||
import 'package:pj_supermarket_cloud/common/index.dart';
|
||||
import 'package:dio/dio.dart' as dio;
|
||||
|
||||
abstract class WalletApi {
|
||||
/// 优惠列表
|
||||
static Future<List<DiscountsItem>?> getDiscountsListByUserId(
|
||||
static Future<List<DiscountsItem>> getDiscountsListByUserId(
|
||||
dynamic params,
|
||||
) async {
|
||||
final res = await HttpManage().dio.get(
|
||||
"/wallet/wallet-setting/ad/get-discounts-list",
|
||||
queryParameters: params,
|
||||
options: dio.Options(
|
||||
extra: {HttpManage.rejectBusinessErrorKey: true},
|
||||
),
|
||||
);
|
||||
if (res.data == null) return null;
|
||||
if (res.data is! List) {
|
||||
throw const FormatException('优惠列表返回格式异常,请重试');
|
||||
}
|
||||
return (res.data as List).map((e) => DiscountsItem.fromJson(e)).toList();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user