From d34cab0145e2a40b30af12baad32bff68b9043ba Mon Sep 17 00:00:00 2001 From: Dev Date: Mon, 19 Oct 2026 16:15:03 +0800 Subject: [PATCH] =?UTF-8?q?tabbar=E9=80=89=E4=B8=AD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/miniapp/pages/goods/list/index.js | 8 ++++++++ frontend/miniapp/pages/message/list/index.js | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/frontend/miniapp/pages/goods/list/index.js b/frontend/miniapp/pages/goods/list/index.js index a908dc6..0d2bfc9 100644 --- a/frontend/miniapp/pages/goods/list/index.js +++ b/frontend/miniapp/pages/goods/list/index.js @@ -179,6 +179,14 @@ Page({ this.loadGoodsList(true); }, + onShow() { + // 自定义 tabBar 每个 Tab 页各有一份实例,切过来后要按当前路由重设选中项 + const tabBar = typeof this.getTabBar === 'function' && this.getTabBar(); + if (tabBar) { + tabBar.init(); + } + }, + async applyCaseView() { if (this.data.caseView) { wx.setNavigationBarTitle({ title: '软件案例' }); diff --git a/frontend/miniapp/pages/message/list/index.js b/frontend/miniapp/pages/message/list/index.js index d495c52..fa0b4b3 100644 --- a/frontend/miniapp/pages/message/list/index.js +++ b/frontend/miniapp/pages/message/list/index.js @@ -154,6 +154,11 @@ Page({ }, onShow() { + // 自定义 tabBar 每个 Tab 页各有一份实例,切过来后要按当前路由重设选中项 + const tabBar = typeof this.getTabBar === 'function' && this.getTabBar(); + if (tabBar) { + tabBar.init(); + } this.loadList(true); },