mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-05-18 15:07:38 +08:00
43 lines
889 B
Vue
43 lines
889 B
Vue
<script setup>
|
|
import { onMounted, ref } from 'vue';
|
|
import { useI18n } from 'vue-i18n'
|
|
|
|
import { useGlobalState } from '../../store'
|
|
import { api } from '../../api'
|
|
|
|
const { loading } = useGlobalState()
|
|
const message = useMessage()
|
|
|
|
const settings = ref({})
|
|
|
|
const fetchData = async () => {
|
|
try {
|
|
const res = await api.fetch(`/admin/worker/configs`)
|
|
Object.assign(settings.value, res)
|
|
} catch (error) {
|
|
message.error(error.message || "error");
|
|
}
|
|
}
|
|
|
|
onMounted(async () => {
|
|
await fetchData();
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div class="center">
|
|
<n-card :bordered="false" embedded style="max-width: 600px;">
|
|
<pre>{{ JSON.stringify(settings, null, 2) }}</pre>
|
|
</n-card>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.center {
|
|
display: flex;
|
|
text-align: left;
|
|
place-items: center;
|
|
justify-content: center;
|
|
}
|
|
</style>
|