45 lines
1.3 KiB
Dart
45 lines
1.3 KiB
Dart
import 'package:pj_supermarket_cloud/common/index.dart';
|
|
|
|
abstract class WalletApi {
|
|
/// 支付配置
|
|
static Future<ServicePaySetting?> getPaySetting() async {
|
|
final res = await HttpManage().dio.get(
|
|
"/wallet/wallet-setting/ad/get-setting",
|
|
);
|
|
if (res.data == null) return null;
|
|
return ServicePaySetting.fromJson(res.data);
|
|
}
|
|
|
|
/// 开卡列表
|
|
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 ServiceOpenCardPage.fromJson(res.data);
|
|
}
|
|
|
|
/// 开卡成功
|
|
static Future<bool> openCardSuccess(dynamic pa) async {
|
|
final res = await HttpManage().dio.get<ServiceBase>(
|
|
"/wallet/wallet-active/ad/open-card-success",
|
|
queryParameters: pa,
|
|
);
|
|
if (res.data == null) return false;
|
|
return true;
|
|
}
|
|
|
|
/// 重新激活
|
|
static Future<bool> refreshAvatar(dynamic pa) async {
|
|
final res = await HttpManage().dio.get<ServiceBase>(
|
|
"/wallet/wallet-active/ad/refresh-avatar",
|
|
queryParameters: pa,
|
|
);
|
|
if (res.data == null) return false;
|
|
return true;
|
|
}
|
|
}
|