This commit is contained in:
sion
2026-04-05 23:28:38 +08:00
parent 0c66b3725f
commit da0f9d6f5e
21 changed files with 640 additions and 394 deletions

View File

@@ -51,6 +51,7 @@ class FundService {
Future<ApiResponse<Map<String, dynamic>>> withdraw({
required String amount,
required String withdrawAddress,
String? network,
String? withdrawContact,
String? remark,
}) async {
@@ -59,12 +60,27 @@ class FundService {
data: {
'amount': amount,
'withdrawAddress': withdrawAddress,
if (network != null) 'network': network,
if (withdrawContact != null) 'withdrawContact': withdrawContact,
if (remark != null) 'remark': remark,
},
);
}
/// 获取可用的提现网络列表
Future<ApiResponse<List<String>>> getWalletNetworks() async {
final response = await _client.get<List<dynamic>>(
ApiEndpoints.walletNetworks,
);
if (response.success && response.data != null) {
return ApiResponse.success(
response.data!.cast<String>(),
response.message,
);
}
return ApiResponse.fail(response.message ?? '获取网络列表失败');
}
/// 取消订单
Future<ApiResponse<void>> cancelOrder(String orderNo) async {
return _client.post<void>(