一次大的提交
This commit is contained in:
@@ -9,6 +9,7 @@ import 'package:maibu_satabot_v2/features/home/presentation/routes/home_routes.d
|
||||
import 'package:maibu_satabot_v2/features/main_container/presentation/pages/tab_settings_page.dart';
|
||||
import 'package:maibu_satabot_v2/features/my/presentation/routes/my_routes.dart';
|
||||
import 'package:maibu_satabot_v2/features/v2/waring_center/presentation/routes/alarm_center_routes.dart';
|
||||
import 'package:maibu_satabot_v2/features/v2/workorder/presentation/routes/workorder_routes.dart';
|
||||
|
||||
import '../../features/auth/presentation/bloc/auth_cubit.dart';
|
||||
import '../../features/auth/presentation/bloc/auth_state.dart';
|
||||
@@ -20,11 +21,13 @@ import 'go_router_refresh_stream.dart';
|
||||
GoRouter createRouter(AuthCubit authCubit) {
|
||||
// 调试:打印所有路由
|
||||
debugPrint('🔍 [Router] 开始创建路由配置...');
|
||||
debugPrint('🔍 [Router] AlarmCenterRoutes.routes 数量: ${AlarmCenterRoutes.routes.length}');
|
||||
debugPrint(
|
||||
'🔍 [Router] AlarmCenterRoutes.routes 数量: ${AlarmCenterRoutes.routes.length}',
|
||||
);
|
||||
for (var route in AlarmCenterRoutes.routes) {
|
||||
debugPrint('🔍 [Router] 路由: ${route.toString()}');
|
||||
}
|
||||
|
||||
|
||||
return GoRouter(
|
||||
navigatorKey: navigatorKey, // 🔥 绑定全局 navigatorKey,使异地登录弹窗能获取 context
|
||||
initialLocation: RoutePaths.login,
|
||||
@@ -74,6 +77,7 @@ GoRouter createRouter(AuthCubit authCubit) {
|
||||
...AiRoutes.routes,
|
||||
...MyRoutes.routes,
|
||||
...AlarmCenterRoutes.routes,
|
||||
...WorkOrderRoutes.routes,
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,4 +20,8 @@ class RoutePaths {
|
||||
static const settings = '/my/settings';
|
||||
|
||||
static const machineDetails = '/machine_details/machine_details';
|
||||
|
||||
/// 工单相关页面
|
||||
static const workOrder = '/workorder';
|
||||
static const workOrderDetail = '/workorder/detail/:orderId';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user