refactor: 修复ai提示本地记录方式

This commit is contained in:
wangjiahao 2024-06-04 10:35:42 +08:00
parent bfa0d131f3
commit 2051674c85

View File

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