fix(mobile-app): 用户在合同/KYC页面时跳过后台弹窗检查

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-25 22:08:35 -08:00
parent 838fbce914
commit 5ee12be00f
1 changed files with 26 additions and 0 deletions

View File

@ -100,10 +100,30 @@ class _HomeShellPageState extends ConsumerState<HomeShellPage>
});
}
/// KYC相关页面
bool _isOnContractOrKycPage() {
try {
final location = GoRouterState.of(context).uri.path;
//
if (location.startsWith('/contract-signing')) return true;
// KYC
if (location.startsWith('/kyc')) return true;
return false;
} catch (e) {
return false;
}
}
/// + KYC
Future<void> _performBackgroundContractCheck() async {
if (!mounted || _isShowingDialog) return;
// KYC页面
if (_isOnContractOrKycPage()) {
debugPrint('[HomeShellPage] 用户在合同/KYC页面跳过后台检查');
return;
}
try {
debugPrint('[HomeShellPage] 执行后台综合检查...');
@ -112,6 +132,12 @@ class _HomeShellPageState extends ConsumerState<HomeShellPage>
if (!mounted || _isShowingDialog) return;
//
if (_isOnContractOrKycPage()) {
debugPrint('[HomeShellPage] 用户已进入合同/KYC页面跳过弹窗');
return;
}
// 1.
if (result.hasPendingContracts) {
debugPrint('[HomeShellPage] 后台检测到待签署合同,显示弹窗');