From fe1b3f5e026c08268333d8a9fe00af10791e617f Mon Sep 17 00:00:00 2001 From: zoujing Date: Fri, 7 Aug 2026 10:21:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A4=84=E7=90=86=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Discovery/index.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/Discovery/index.vue b/src/pages/Discovery/index.vue index fedb45c..de64bdb 100644 --- a/src/pages/Discovery/index.vue +++ b/src/pages/Discovery/index.vue @@ -65,6 +65,7 @@ const appStore = useAppStore(); const locationStore = useLocationStore(); /// 从个渠道获取如二维码 const sceneId = appStore.sceneId || ""; +const currentTabsId = ref(""); const activeIndex = ref(0); const discoveryTabs = ref([]); @@ -90,6 +91,7 @@ const handleContentScroll = (e) => { /// 点击主景区 const handleMainPanoramaClick = () => { isMainPanoramaGuide.value = true; + currentTabsId.value = ""; discoveryTabs.value = []; discoveryCards.value = []; exploreCards.value = []; @@ -138,8 +140,10 @@ const handlePanoramicHomeSelect = (item) => { /// 根据id查询tab并设置activeIndex const findTabByIdWithActiveTabIndex = (tabsId) => { const resolvedTab = resolveDiscoveryTab(discoveryTabs.value, tabsId); - if (!resolvedTab.tab) return; + if (!resolvedTab.tab?.id) return; + if (currentTabsId.value === resolvedTab.tab.id) return; + currentTabsId.value = resolvedTab.tab.id; activeIndex.value = resolvedTab.activeIndex; queryDiscoveryData(resolvedTab.tab); }