fix(mining-app): 添加收款方验证成功提示和调试日志
- 验证成功时显示绿色 SnackBar 提示 - 添加调试日志帮助诊断可用余额问题 - 温馨提示中添加积分值获取方式说明 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
8fe38525a2
commit
6ebc1f8767
|
|
@ -48,6 +48,27 @@ class _SendSharesPageState extends ConsumerState<SendSharesPage> {
|
|||
|
||||
final availableCash = assetAsync.valueOrNull?.availableCash ?? '0';
|
||||
|
||||
// Debug: 打印资产数据
|
||||
debugPrint('=== SendSharesPage 资产数据 ===');
|
||||
debugPrint('user.isLoggedIn: ${user.isLoggedIn}');
|
||||
debugPrint('user.phone: ${user.phone}');
|
||||
debugPrint('accountSequence: $accountSequence');
|
||||
debugPrint('assetAsync.hasValue: ${assetAsync.hasValue}');
|
||||
debugPrint('assetAsync.hasError: ${assetAsync.hasError}');
|
||||
if (assetAsync.hasError) {
|
||||
debugPrint('assetAsync.error: ${assetAsync.error}');
|
||||
}
|
||||
if (assetAsync.hasValue && assetAsync.value != null) {
|
||||
final asset = assetAsync.value!;
|
||||
debugPrint('availableCash: ${asset.availableCash}');
|
||||
debugPrint('cashBalance: ${asset.cashBalance}');
|
||||
debugPrint('frozenCash: ${asset.frozenCash}');
|
||||
debugPrint('availableShares: ${asset.availableShares}');
|
||||
debugPrint('shareBalance: ${asset.shareBalance}');
|
||||
}
|
||||
debugPrint('最终 availableCash: $availableCash');
|
||||
debugPrint('==============================');
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: _bgGray,
|
||||
appBar: AppBar(
|
||||
|
|
@ -461,7 +482,7 @@ class _SendSharesPageState extends ConsumerState<SendSharesPage> {
|
|||
),
|
||||
SizedBox(height: 8),
|
||||
Text(
|
||||
'1. 转账前请确认收款方账号正确\n2. 积分值转账不可撤销,请谨慎操作\n3. 转账后将从您的可用积分值中扣除',
|
||||
'1. 转账前请确认收款方账号正确\n2. 积分值转账不可撤销,请谨慎操作\n3. 转账后将从您的可用积分值中扣除\n4. 积分值是通过卖出积分股获得的,如需转账请先卖出积分股',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: _grayText,
|
||||
|
|
@ -533,6 +554,15 @@ class _SendSharesPageState extends ConsumerState<SendSharesPage> {
|
|||
_isRecipientVerified = true;
|
||||
_recipientNickname = account.nickname ?? _maskPhone(phone);
|
||||
});
|
||||
// 显示验证成功提示
|
||||
if (mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('收款方验证成功: ${account.nickname ?? _maskPhone(phone)}'),
|
||||
backgroundColor: _green,
|
||||
),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
setState(() {
|
||||
_isRecipientVerified = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue