fix(mobile-app): 首次检查也加入路由判断,避免在KYC页面弹窗
_checkContractsAndKyc() 方法之前没有调用 _shouldSkipContractCheck(), 导致用户在合同/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
b40cd40eae
commit
73f2b85ddf
|
|
@ -173,12 +173,24 @@ class _HomeShellPageState extends ConsumerState<HomeShellPage>
|
|||
if (_hasCheckedContracts) return;
|
||||
_hasCheckedContracts = true;
|
||||
|
||||
// 如果用户已在合同/KYC页面,跳过检查
|
||||
if (_shouldSkipContractCheck()) {
|
||||
debugPrint('[HomeShellPage] 首次检查:用户在合同/KYC/升级页面,跳过');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
final contractCheckService = ref.read(contractCheckServiceProvider);
|
||||
final result = await contractCheckService.checkAll();
|
||||
|
||||
if (!mounted) return;
|
||||
|
||||
// 再次检查,防止在请求期间用户进入了相关页面
|
||||
if (_shouldSkipContractCheck()) {
|
||||
debugPrint('[HomeShellPage] 首次检查:用户已进入合同/KYC/升级页面,跳过弹窗');
|
||||
return;
|
||||
}
|
||||
|
||||
// 1. 优先处理待签署合同
|
||||
if (result.hasPendingContracts) {
|
||||
// 有待签署合同,跳转到待签署列表页面
|
||||
|
|
|
|||
Loading…
Reference in New Issue