feat: 处理重复请求

This commit is contained in:
2026-08-07 10:21:25 +08:00
parent 7d7c235a71
commit fe1b3f5e02

View File

@@ -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);
}