fix(mobile-app): 修复签署成功后导航报错问题
- 签署成功后检查 canPop() 再决定返回方式 - 如果没有上一页则跳转到首页 🤖 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
2d9e1b2d03
commit
36e4e875bf
|
|
@ -343,8 +343,14 @@ class _ContractSigningPageState extends ConsumerState<ContractSigningPage> {
|
|||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
context.pop(true);
|
||||
Navigator.of(context).pop(); // 关闭对话框
|
||||
// 检查是否可以返回上一页
|
||||
if (context.canPop()) {
|
||||
context.pop(true);
|
||||
} else {
|
||||
// 如果没有上一页,跳转到首页
|
||||
context.go('/');
|
||||
}
|
||||
},
|
||||
child: const Text('完成'),
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue