From 1121631a138a1432abff1d6f0ba06709da05b495 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Sun, 18 Jan 2026 21:11:08 +0800 Subject: [PATCH] fix --- src/shared/store/loginSummary.ts | 16 ---------------- src/utils/constants.ts | 1 - 2 files changed, 17 deletions(-) diff --git a/src/shared/store/loginSummary.ts b/src/shared/store/loginSummary.ts index 810168b..e57d924 100644 --- a/src/shared/store/loginSummary.ts +++ b/src/shared/store/loginSummary.ts @@ -1,6 +1,4 @@ import { getAILoginSummary } from "oj/api" -import { STORAGE_KEY } from "utils/constants" -import storage from "utils/storage" interface LoginSummary { start: string @@ -19,14 +17,6 @@ export const useLoginSummaryStore = defineStore("loginSummary", () => { const analysis = ref("") const analysisError = ref("") - function getTodayKey() { - const now = new Date() - const year = now.getFullYear() - const month = String(now.getMonth() + 1).padStart(2, "0") - const day = String(now.getDate()).padStart(2, "0") - return `${year}-${month}-${day}` - } - async function fetchSummary() { loading.value = true analysis.value = "" @@ -44,12 +34,6 @@ export const useLoginSummaryStore = defineStore("loginSummary", () => { } async function open() { - const today = getTodayKey() - const lastShown = storage.get(STORAGE_KEY.LOGIN_SUMMARY_LAST_SHOWN) - if (lastShown === today) { - return - } - storage.set(STORAGE_KEY.LOGIN_SUMMARY_LAST_SHOWN, today) show.value = true await fetchSummary() } diff --git a/src/utils/constants.ts b/src/utils/constants.ts index cdeb2dc..feb8f26 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -130,7 +130,6 @@ export const STORAGE_KEY = { LEARN_CURRENT_STEP: "learnStep", ADMIN_PROBLEM: "adminProblem", ADMIN_PROBLEM_TAGS: "adminProblemTags", - LOGIN_SUMMARY_LAST_SHOWN: "login-summary-last-shown", } export const DIFFICULTY = {