diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index 646833a..b4533f9 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -166,11 +166,11 @@ class HomePageState extends RouteAwareState _scrollController.addListener(_onScroll); WidgetsBinding.instance.addObserver(this); RouteService().addListener(onRouteConfigLoaded); - + Future.microtask(() { + _updateModuleAndButtonVisibility(); + }); if (_isShowCheckLogin) { - Future.microtask(() { - _updateModuleAndButtonVisibility(); - }); + _getToDoWorkList(pcType); } } diff --git a/lib/pages/main_tab.dart b/lib/pages/main_tab.dart index 0b99a85..095db40 100644 --- a/lib/pages/main_tab.dart +++ b/lib/pages/main_tab.dart @@ -118,9 +118,10 @@ class _MainPageState extends State with WidgetsBindingObserver { } catch (e) { debugPrint('loadFromAssets error: $e'); } - final data = route?['data'] ?? []; - RouteService().initializeRoutes(data); } + final data = route?['data'] ?? []; + RouteService().initializeRoutes(data); + } catch (e) { debugPrint('获取路由配置失败: $e');