From 87ff3a11487d8ed03a4de46694cefd8ae8d8c013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=AE=E6=A3=83?= Date: Sat, 25 Jan 2025 21:11:49 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20=E8=B0=83=E6=95=B4=E5=85=91?= =?UTF-8?q?=E6=8D=A2=E7=A0=81=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/app/t-gameNav.vue | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/app/t-gameNav.vue b/src/components/app/t-gameNav.vue index 396a9a84..07e6b7f6 100644 --- a/src/components/app/t-gameNav.vue +++ b/src/components/app/t-gameNav.vue @@ -36,9 +36,9 @@ const codeData = shallowRef([]); const showOverlay = ref(false); const actId = ref(); -const hasNav = computed(() => { - if (props.modelValue !== 2) return false; - return nav.value.find((item) => item.name === "前瞻直播") !== undefined; +const hasNav = computed(() => { + if (props.modelValue !== 2) return undefined; + return nav.value.find((item) => item.name === "前瞻直播" || item.name === "直播兑换码"); }); onMounted(async () => await loadNav()); @@ -54,9 +54,8 @@ async function loadNav(): Promise { async function tryGetCode(): Promise { if (props.modelValue !== 2) return; - const navFind = nav.value.find((item) => item.name === "前瞻直播"); - if (!navFind) return; - const actIdFind = new URL(navFind.app_path).searchParams.get("act_id"); + if (!hasNav.value) return; + const actIdFind = new URL(hasNav.value.app_path).searchParams.get("act_id"); if (!actIdFind) { showSnackbar.warn("未找到活动ID"); return;