From 2051674c85093365ef2ea7828ad6c1c3abfe4e86 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 4 Jun 2024 10:35:42 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=AE=E5=A4=8Dai=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E6=9C=AC=E5=9C=B0=E8=AE=B0=E5=BD=95=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/layout/components/Header.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/core-frontend/src/layout/components/Header.vue b/core/core-frontend/src/layout/components/Header.vue index edeb8cf4ad..ca2f16c6ac 100644 --- a/core/core-frontend/src/layout/components/Header.vue +++ b/core/core-frontend/src/layout/components/Header.vue @@ -22,7 +22,8 @@ import AiTips from '@/layout/components/AiTips.vue' const appearanceStore = useAppearanceStoreWithOut() const { push } = useRouter() const route = useRoute() - +import { useCache } from '@/hooks/web/useCache' +const { wsCache } = useCache('localStorage') const aiBaseUrl = ref(null) const handleIconClick = () => { if (route.path === '/workbranch/index') return @@ -65,7 +66,7 @@ const navigateBg = computed(() => appearanceStore.getNavigateBg) const navigate = computed(() => appearanceStore.getNavigate) const initAiBase = async () => { - const aiTipsCheck = localStorage.getItem('DE-AI-TIPS-CHECK') + const aiTipsCheck = wsCache.get('DE-AI-TIPS-CHECK') if (aiTipsCheck === 'CHECKED') { showOverlay.value = false } else { @@ -80,7 +81,7 @@ const initAiBase = async () => { } const aiTipsConfirm = () => { - localStorage.setItem('DE-AI-TIPS-CHECK', 'CHECKED') + wsCache.set('DE-AI-TIPS-CHECK', 'CHECKED') showOverlay.value = false } onMounted(() => {