From 47b1c1db047e194e2c6e8d6a136c934c3e2195c3 Mon Sep 17 00:00:00 2001 From: yixu Date: Thu, 25 Dec 2025 15:55:57 +0800 Subject: [PATCH] update --- src/components/GameSwiper.vue | 19 ++++--------------- src/components/HomePage.vue | 12 ++---------- 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/src/components/GameSwiper.vue b/src/components/GameSwiper.vue index 661ed21..e898d59 100644 --- a/src/components/GameSwiper.vue +++ b/src/components/GameSwiper.vue @@ -116,21 +116,10 @@ const isConfirmBtnDisplay = computed(() => { }) const getGameInfo = async () => { - const result = await Request('game/info', { refresh_official: true, refresh_cap_scan: true }, "GET") - if (result?.res?.status === 200) { - console.log(result) - globalStore.completed_games_today = result.json.completed_games_today || []; - //TODO: 测试数据 - // globalStore.completed_games_today = ['game1', 'game3']; - slides.value = slides.value.map(slide => ({ - ...slide, - show: globalStore.completed_games_today.includes(`game${slide.id}`) - })); - } else { - weui.alert("获取游戏数据失败,请刷新页面重试"); - emit('close'); - return - } + slides.value = slides.value.map(slide => ({ + ...slide, + show: globalStore.completed_games_today.includes(`game${slide.id}`) + })); } watch(() => props.show, async (newVal) => { diff --git a/src/components/HomePage.vue b/src/components/HomePage.vue index b016d1f..a95cc93 100644 --- a/src/components/HomePage.vue +++ b/src/components/HomePage.vue @@ -317,20 +317,11 @@ const initUserGameInfos = async (refresh_official, refresh_cap_scan) => { globalToastEvent.emit(ToastType.MOUNTED) } } -// const getNotice = async () => { -// const result = await Request('notice/latest', {}, "GET") -// if (result?.json?.notification) { -// lotteryType.value = 'notice' -// lotteryNoticeData.value = result.json.notification -// lotteryShow.value = true -// } -// } const handleLoginSuccess = async () => { console.log("已登录") loginShow.value = false await fromShare() - // await initUserGameInfos(true, true) - // await getNotice() + await initUserGameInfos(true, true) } if (isLogin()) { @@ -362,6 +353,7 @@ const navigateGamePage = async () => { const result = await Request('game/info', { refresh_official: false, refresh_cap_scan: false }, "GET") if (result?.res?.status === 200) { globalStore.draw_chances = result.json.draw_chances + globalStore.completed_games_today = result.json.completed_games_today || []; if (globalStore.draw_chances <= 0) { return weui.alert("还没有探索机会,快去参加活动吧") } else {