Merge pull request #10063 from dataease/pr@dev-v2@fix_aiTips

refactor: 修复ai提示本地记录方式
This commit is contained in:
王嘉豪 2024-06-04 10:50:00 +08:00 committed by GitHub
commit 051c15eeb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,7 +23,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
@ -69,7 +70,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 {
@ -84,7 +85,7 @@ const initAiBase = async () => {
}
const aiTipsConfirm = () => {
localStorage.setItem('DE-AI-TIPS-CHECK', 'CHECKED')
wsCache.set('DE-AI-TIPS-CHECK', 'CHECKED')
showOverlay.value = false
}
onMounted(() => {