1
0
mirror of https://github.com/ZeroCatDev/Classworks.git synced 2025-12-08 13:49:37 +00:00
Classworks/src/pages/debug.vue
copilot-swe-agent[bot] 5d3721d069 fix: remove duplicate deletePersistentNotification method definition
Co-authored-by: Sunwuyuan <88357633+Sunwuyuan@users.noreply.github.com>
2025-11-30 10:07:04 +00:00

54 lines
1.2 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<v-container>
<v-card class="mb-4">
<v-card-title>调试信息</v-card-title>
<v-card-subtitle>
请将这个ID复制并私聊给开发者以便进行问题排查
</v-card-subtitle>
<v-card-text>
<div class="text-h6 mb-2">
访客 ID
</div>
<v-code class="d-block pa-2 bg-grey-lighten-4 rounded mb-4">
{{ visitorId || '加载中...' }}
</v-code>
</v-card-text>
<v-card-actions>
<v-btn
color="primary"
:loading="loading"
@click="loadData"
>
Refresh
</v-btn>
</v-card-actions>
</v-card>
</v-container>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { getVisitorId, getFingerprintData } from '@/utils/fingerprint'
const visitorId = ref('')
const fingerprintData = ref({})
const loading = ref(false)
const loadData = async () => {
loading.value = true
try {
visitorId.value = await getVisitorId()
fingerprintData.value = await getFingerprintData()
} catch (e) {
console.error(e)
visitorId.value = 'Error loading visitor ID'
} finally {
loading.value = false
}
}
onMounted(() => {
loadData()
})
</script>