vue3/src/views/infra/server/index.vue
YunaiV 96a96b1a5d 增加 404 的说明
(cherry picked from commit 1be57ea8d3)
2023-09-25 12:47:49 +08:00

29 lines
797 B
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>
<ContentWrap>
<IFrame v-if="!loading" v-loading="loading" :src="src" />
</ContentWrap>
</template>
<script lang="ts" setup>
import * as ConfigApi from '@/api/infra/config'
defineOptions({ name: 'InfraAdminServer' })
const loading = ref(true) // 是否加载中
const src = ref(import.meta.env.VITE_BASE_URL + '/admin/applications')
/** 初始化 */
onMounted(async () => {
try {
// 友情提示:如果访问出现 404 问题:
// 1boot 参考 https://doc.iocoder.cn/server-monitor/ 解决;
// 2cloud 参考 https://cloud.iocoder.cn/server-monitor/ 解决
const data = await ConfigApi.getConfigKeyApi('url.spring-boot-admin')
if (data && data.length > 0) {
src.value = data
}
} finally {
loading.value = false
}
})
</script>