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(() => {