fix(withdraw): 将确认页面中的提款改为提取
- 页面标题"确认提款" → "确认提取" - "提款详情" → "提取详情" - "提款网络" → "提取网络" - "提款地址" → "接收地址" - "提款金额" → "提取数量" - "提款申请已提交" → "提取申请已提交" - 按钮文字"确认提款" → "确认提取" - 错误提示"提款失败" → "提取失败" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
9cc66d8c61
commit
2dba7633d8
|
|
@ -4,8 +4,8 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'withdraw_usdt_page.dart';
|
import 'withdraw_usdt_page.dart';
|
||||||
|
|
||||||
/// 提款确认页面
|
/// 提取确认页面
|
||||||
/// 显示提款详情并进行谷歌验证器验证
|
/// 显示提取详情并进行谷歌验证器验证
|
||||||
class WithdrawConfirmPage extends ConsumerStatefulWidget {
|
class WithdrawConfirmPage extends ConsumerStatefulWidget {
|
||||||
final WithdrawUsdtParams params;
|
final WithdrawUsdtParams params;
|
||||||
|
|
||||||
|
|
@ -84,7 +84,7 @@ class _WithdrawConfirmPageState extends ConsumerState<WithdrawConfirmPage> {
|
||||||
return '${address.substring(0, 8)}...${address.substring(address.length - 8)}';
|
return '${address.substring(0, 8)}...${address.substring(address.length - 8)}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 提交提款
|
/// 提交提取
|
||||||
Future<void> _onSubmit() async {
|
Future<void> _onSubmit() async {
|
||||||
final code = _getCode();
|
final code = _getCode();
|
||||||
|
|
||||||
|
|
@ -99,13 +99,13 @@ class _WithdrawConfirmPageState extends ConsumerState<WithdrawConfirmPage> {
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
debugPrint('[WithdrawConfirmPage] 开始提款...');
|
debugPrint('[WithdrawConfirmPage] 开始提取...');
|
||||||
debugPrint('[WithdrawConfirmPage] 金额: ${widget.params.amount} USDT');
|
debugPrint('[WithdrawConfirmPage] 金额: ${widget.params.amount} USDT');
|
||||||
debugPrint('[WithdrawConfirmPage] 地址: ${widget.params.address}');
|
debugPrint('[WithdrawConfirmPage] 地址: ${widget.params.address}');
|
||||||
debugPrint('[WithdrawConfirmPage] 网络: ${_getNetworkName(widget.params.network)}');
|
debugPrint('[WithdrawConfirmPage] 网络: ${_getNetworkName(widget.params.network)}');
|
||||||
debugPrint('[WithdrawConfirmPage] 验证码: $code');
|
debugPrint('[WithdrawConfirmPage] 验证码: $code');
|
||||||
|
|
||||||
// TODO: 调用 API 提交提款请求
|
// TODO: 调用 API 提交提取请求
|
||||||
// final walletService = ref.read(walletServiceProvider);
|
// final walletService = ref.read(walletServiceProvider);
|
||||||
// await walletService.withdrawUsdt(
|
// await walletService.withdrawUsdt(
|
||||||
// amount: widget.params.amount,
|
// amount: widget.params.amount,
|
||||||
|
|
@ -126,12 +126,12 @@ class _WithdrawConfirmPageState extends ConsumerState<WithdrawConfirmPage> {
|
||||||
_showSuccessDialog();
|
_showSuccessDialog();
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
debugPrint('[WithdrawConfirmPage] 提款失败: $e');
|
debugPrint('[WithdrawConfirmPage] 提取失败: $e');
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_isSubmitting = false;
|
_isSubmitting = false;
|
||||||
});
|
});
|
||||||
_showErrorSnackBar('提款失败: ${e.toString()}');
|
_showErrorSnackBar('提取失败: ${e.toString()}');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -163,7 +163,7 @@ class _WithdrawConfirmPageState extends ConsumerState<WithdrawConfirmPage> {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
const Text(
|
const Text(
|
||||||
'提款申请已提交',
|
'提取申请已提交',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
|
|
@ -243,7 +243,7 @@ class _WithdrawConfirmPageState extends ConsumerState<WithdrawConfirmPage> {
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
// 提款详情卡片
|
// 提取详情卡片
|
||||||
_buildDetailsCard(),
|
_buildDetailsCard(),
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 24),
|
||||||
|
|
||||||
|
|
@ -288,7 +288,7 @@ class _WithdrawConfirmPageState extends ConsumerState<WithdrawConfirmPage> {
|
||||||
// 标题
|
// 标题
|
||||||
const Expanded(
|
const Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'确认提款',
|
'确认提取',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
|
|
@ -307,7 +307,7 @@ class _WithdrawConfirmPageState extends ConsumerState<WithdrawConfirmPage> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 构建提款详情卡片
|
/// 构建提取详情卡片
|
||||||
Widget _buildDetailsCard() {
|
Widget _buildDetailsCard() {
|
||||||
final fee = _calculateFee();
|
final fee = _calculateFee();
|
||||||
final actual = _calculateActualAmount();
|
final actual = _calculateActualAmount();
|
||||||
|
|
@ -327,7 +327,7 @@ class _WithdrawConfirmPageState extends ConsumerState<WithdrawConfirmPage> {
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const Text(
|
const Text(
|
||||||
'提款详情',
|
'提取详情',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
|
|
@ -336,11 +336,11 @@ class _WithdrawConfirmPageState extends ConsumerState<WithdrawConfirmPage> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
_buildDetailRow('提款网络', _getNetworkName(widget.params.network)),
|
_buildDetailRow('提取网络', _getNetworkName(widget.params.network)),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
_buildDetailRow('提款地址', _formatAddress(widget.params.address)),
|
_buildDetailRow('接收地址', _formatAddress(widget.params.address)),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
_buildDetailRow('提款金额', '${widget.params.amount.toStringAsFixed(2)} 积分'),
|
_buildDetailRow('提取数量', '${widget.params.amount.toStringAsFixed(2)} 积分'),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
_buildDetailRow('手续费', '${fee.toStringAsFixed(2)} 积分'),
|
_buildDetailRow('手续费', '${fee.toStringAsFixed(2)} 积分'),
|
||||||
const Divider(color: Color(0x33D4AF37), height: 24),
|
const Divider(color: Color(0x33D4AF37), height: 24),
|
||||||
|
|
@ -536,7 +536,7 @@ class _WithdrawConfirmPageState extends ConsumerState<WithdrawConfirmPage> {
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: const Text(
|
: const Text(
|
||||||
'确认提款',
|
'确认提取',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue