fix(mobile-app): 修复路由顺序避免 pending 被当成 orderNo
将 /contract-signing/pending 路由放在 /contract-signing/:orderNo 前面, 避免 GoRouter 将 "pending" 匹配为动态参数。 🤖 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
c826da164c
commit
2a85fcc7fa
|
|
@ -406,6 +406,17 @@ final appRouterProvider = Provider<GoRouter>((ref) {
|
|||
builder: (context, state) => const ChangePhonePage(),
|
||||
),
|
||||
|
||||
// Pending Contracts Page (待签署合同列表)
|
||||
// 注意:必须放在 contractSigning/:orderNo 前面,否则 "pending" 会被当成 orderNo
|
||||
GoRoute(
|
||||
path: RoutePaths.pendingContracts,
|
||||
name: RouteNames.pendingContracts,
|
||||
builder: (context, state) {
|
||||
final forceSign = state.extra as bool? ?? false;
|
||||
return PendingContractsPage(forceSign: forceSign);
|
||||
},
|
||||
),
|
||||
|
||||
// Contract Signing Page (合同签署)
|
||||
GoRoute(
|
||||
path: '${RoutePaths.contractSigning}/:orderNo',
|
||||
|
|
@ -416,16 +427,6 @@ final appRouterProvider = Provider<GoRouter>((ref) {
|
|||
},
|
||||
),
|
||||
|
||||
// Pending Contracts Page (待签署合同列表)
|
||||
GoRoute(
|
||||
path: RoutePaths.pendingContracts,
|
||||
name: RouteNames.pendingContracts,
|
||||
builder: (context, state) {
|
||||
final forceSign = state.extra as bool? ?? false;
|
||||
return PendingContractsPage(forceSign: forceSign);
|
||||
},
|
||||
),
|
||||
|
||||
// Main Shell with Bottom Navigation
|
||||
ShellRoute(
|
||||
navigatorKey: _shellNavigatorKey,
|
||||
|
|
|
|||
Loading…
Reference in New Issue