feat: 更新 docker-compose 配置,修改服务名称并升级版本;优化应用详情页数据获取方式,直接使用数据文件

This commit is contained in:
2026-01-03 23:11:03 +07:00
parent d18253d1ab
commit c3f4c2709d
4 changed files with 43 additions and 23 deletions

View File

@@ -1,15 +1,16 @@
<script setup lang="ts">
import type { AppInfo } from '~/types'
import { apps } from '~/data/apps'
const route = useRoute()
const router = useRouter()
const { t, locale } = useI18n()
// 获取应用详情
const { data: app, error } = await useFetch<AppInfo>(`/api/apps/${route.params.id}`)
// 直接从数据文件获取应用详情
const app = computed(() => apps.find(a => a.id === route.params.id))
// 如果应用不存在,跳转回首页
if (error.value) {
if (!app.value) {
navigateTo('/')
}