From 5ee12be00fc27b12fbf2b058d00ca0df52d82acb Mon Sep 17 00:00:00 2001 From: hailin Date: Thu, 25 Dec 2025 22:08:35 -0800 Subject: [PATCH] =?UTF-8?q?fix(mobile-app):=20=E7=94=A8=E6=88=B7=E5=9C=A8?= =?UTF-8?q?=E5=90=88=E5=90=8C/KYC=E9=A1=B5=E9=9D=A2=E6=97=B6=E8=B7=B3?= =?UTF-8?q?=E8=BF=87=E5=90=8E=E5=8F=B0=E5=BC=B9=E7=AA=97=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../presentation/pages/home_shell_page.dart | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/frontend/mobile-app/lib/features/home/presentation/pages/home_shell_page.dart b/frontend/mobile-app/lib/features/home/presentation/pages/home_shell_page.dart index 0eefda0b..d2a4fbb8 100644 --- a/frontend/mobile-app/lib/features/home/presentation/pages/home_shell_page.dart +++ b/frontend/mobile-app/lib/features/home/presentation/pages/home_shell_page.dart @@ -100,10 +100,30 @@ class _HomeShellPageState extends ConsumerState }); } + /// 检查当前是否在合同签署或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 _performBackgroundContractCheck() async { if (!mounted || _isShowingDialog) return; + // 如果用户在合同签署或KYC页面,跳过检查 + if (_isOnContractOrKycPage()) { + debugPrint('[HomeShellPage] 用户在合同/KYC页面,跳过后台检查'); + return; + } + try { debugPrint('[HomeShellPage] 执行后台综合检查...'); @@ -112,6 +132,12 @@ class _HomeShellPageState extends ConsumerState if (!mounted || _isShowingDialog) return; + // 再次检查,防止在请求期间用户进入了相关页面 + if (_isOnContractOrKycPage()) { + debugPrint('[HomeShellPage] 用户已进入合同/KYC页面,跳过弹窗'); + return; + } + // 1. 优先处理待签署合同 if (result.hasPendingContracts) { debugPrint('[HomeShellPage] 后台检测到待签署合同,显示弹窗');