From 4b9ad6e9f0fdfc222175f7b81ddc98ba60fbc26d Mon Sep 17 00:00:00 2001 From: hs <873121290@qq.com> Date: Wed, 3 Jun 2026 17:03:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=A1=E6=9C=89=E4=BC=81=E4=B8=9A=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/home/home_page.dart | 8 ++++---- lib/pages/main_tab.dart | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) 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');