refactor(frontend): 优化共享视图页面

- 改进 Dashboard 和 Usage 页面
This commit is contained in:
fawney19
2025-12-12 20:22:15 +08:00
parent 5ec1af0907
commit 466b8a62a7
2 changed files with 4 additions and 3 deletions

View File

@@ -1101,7 +1101,7 @@ async function viewAnnouncementDetail(announcement: Announcement) {
try {
await announcementApi.markAsRead(announcement.id)
announcement.is_read = true
} catch {}
} catch { /* 静默忽略标记已读错误 */ }
}
selectedAnnouncement.value = announcement
detailDialogOpen.value = true

View File

@@ -109,6 +109,7 @@ import {
} from '@/features/usage/composables'
import type { PeriodValue, FilterStatusValue } from '@/features/usage/types'
import type { UserOption } from '@/features/usage/components/UsageRecordsTable.vue'
import { log } from '@/utils/logger'
const route = useRoute()
const authStore = useAuthStore()
@@ -250,7 +251,7 @@ async function pollActiveRequests() {
await refreshData()
}
} catch (error) {
console.error('轮询活跃请求状态失败:', error)
log.error('轮询活跃请求状态失败:', error)
}
}
@@ -423,7 +424,7 @@ async function exportData(format: 'csv' | 'json') {
a.click()
window.URL.revokeObjectURL(url)
} catch (error) {
console.error('导出失败:', error)
log.error('导出失败:', error)
}
}
</script>