From a7bdefc23e33360e86f21bd086dea9ba1f3c5b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9E=E4=BB=A3=E7=B6=BA=E5=87=9B?= Date: Sun, 7 Jul 2024 19:58:02 +0800 Subject: [PATCH] fix: not fetch skland cultivate after cred changed --- src/store/skland.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/skland.js b/src/store/skland.js index 5847481d..05dcb83c 100644 --- a/src/store/skland.js +++ b/src/store/skland.js @@ -57,6 +57,7 @@ export const useSklandStore = defineStore('skland', () => { token.value = ''; uid.value = ''; cultivateCharacters.value = {}; + cultivateLastFetch = 0; }); const refreshToken = async () => { @@ -96,7 +97,7 @@ export const useSklandStore = defineStore('skland', () => { }; const updateSklandCultivateIfExpired = async () => { - if (Date.now() - cultivateLastFetch < 1800e3 && cultivateCharacters.value) return; + if (Date.now() - cultivateLastFetch < 1800e3) return; await fetchSklandCultivate(); };