feat: 将/about界面由Strapi迁移至Directus

- 修改相关路由界面
- 增添相应的视图模型与转换方法
This commit is contained in:
2025-10-20 13:48:57 +08:00
parent faf2eb4b44
commit c156d1414c
5 changed files with 60 additions and 11 deletions

View File

@ -15,7 +15,7 @@
</el-breadcrumb>
<div class="content">
<markdown-renderer :content="content || ''" />
<markdown-renderer :content="content.content || ''" />
</div>
<el-divider content-position="left">更多信息</el-divider>
@ -38,17 +38,9 @@
</template>
<script setup lang="ts">
const { findOne } = useStrapi();
const { getStrapiLocale } = useLocalizations();
const strapiLocale = getStrapiLocale();
const { data, pending, error } = await useCompanyProfile();
const { data, pending, error } = useAsyncData('company-profile', () =>
findOne<StrapiCompanyProfile>('company-profile', undefined, {
locale: strapiLocale,
})
);
const content = computed(() => data.value?.data.content);
const content = computed(() => toCompanyProfileView(data.value));
watch(error, (value) => {
if (value) {