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

@@ -82,6 +82,7 @@ class OrderFund {
// 提现状态: 1=待审批, 2=已完成, 3=已驳回, 4=已取消, 5=待财务审核
final int? walletId; // 冷钱包ID(充值)
final String? walletAddress; // 钱包地址(充值/提现)
final String? network; // 提现网络类型
final String? withdrawContact; // 提现联系方式
final String remark;
final String? rejectReason;
@@ -102,6 +103,7 @@ class OrderFund {
required this.status,
this.walletId,
this.walletAddress,
this.network,
this.withdrawContact,
required this.remark,
this.rejectReason,
@@ -124,6 +126,7 @@ class OrderFund {
status: json['status'] as int? ?? 1,
walletId: json['walletId'] as int?,
walletAddress: json['walletAddress'] as String?,
network: json['network'] as String?,
withdrawContact: json['withdrawContact'] as String?,
remark: json['remark']?.toString() ?? '',
rejectReason: json['rejectReason'] as String?,
@@ -167,7 +170,7 @@ class OrderFund {
case 1:
return '待审批';
case 2:
return '完成';
return '出款';
case 3:
return '已驳回';
case 4:

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>(