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:
parent
838fbce914
commit
5ee12be00f
|
|
@ -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)
|
/// 执行后台综合检查(合同 + KYC)
|
||||||
Future<void> _performBackgroundContractCheck() async {
|
Future<void> _performBackgroundContractCheck() async {
|
||||||
if (!mounted || _isShowingDialog) return;
|
if (!mounted || _isShowingDialog) return;
|
||||||
|
|
||||||
|
// 如果用户在合同签署或KYC页面,跳过检查
|
||||||
|
if (_isOnContractOrKycPage()) {
|
||||||
|
debugPrint('[HomeShellPage] 用户在合同/KYC页面,跳过后台检查');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
debugPrint('[HomeShellPage] 执行后台综合检查...');
|
debugPrint('[HomeShellPage] 执行后台综合检查...');
|
||||||
|
|
||||||
|
|
@ -112,6 +132,12 @@ class _HomeShellPageState extends ConsumerState<HomeShellPage>
|
||||||
|
|
||||||
if (!mounted || _isShowingDialog) return;
|
if (!mounted || _isShowingDialog) return;
|
||||||
|
|
||||||
|
// 再次检查,防止在请求期间用户进入了相关页面
|
||||||
|
if (_isOnContractOrKycPage()) {
|
||||||
|
debugPrint('[HomeShellPage] 用户已进入合同/KYC页面,跳过弹窗');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// 1. 优先处理待签署合同
|
// 1. 优先处理待签署合同
|
||||||
if (result.hasPendingContracts) {
|
if (result.hasPendingContracts) {
|
||||||
debugPrint('[HomeShellPage] 后台检测到待签署合同,显示弹窗');
|
debugPrint('[HomeShellPage] 后台检测到待签署合同,显示弹窗');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue