Files
jinshen-website/app/pages/about/index.vue
R2m1liA 6f005c1404
Some checks failed
deploy to server / build-and-deploy (push) Has been cancelled
fix: 调整地图跳转逻辑
- 新增locate页,用于地图跳转
- 调整about页卡片布局
2025-11-18 17:03:40 +08:00

107 lines
2.4 KiB
Vue

<template>
<div class="page-container">
<div v-if="!pending">
<app-breadcrumb class="breadcrumb" :items="breadcrumbItems" />
<div class="content">
<!-- eslint-disable-next-line vue/no-v-html -->
<div class="html-typography" v-html="companyProfile.content || ''" />
<!-- <div v-if="!hydrated" v-html="companyProfile.content || ''" /> -->
<!-- <div v-else> -->
<!-- <html-renderer -->
<!-- class="html-typography" -->
<!-- :html="companyProfile.content || ''" -->
<!-- /> -->
<!-- </div> -->
</div>
<el-divider content-position="left">{{ $t('learn-more') }}</el-divider>
<div class="button-group">
<learn-more-card
:title="$t('navigation.contact-info')"
:icon="ElIconService"
:to="$localePath('/support/contact-us')"
/>
<learn-more-card
:title="$t('navigation.address')"
:icon="ElIconMapLocation"
:to="$localePath('/locate?lng=120.123&lat=30.231&name=xxx')"
/>
</div>
</div>
<div v-else class="loading">
<el-skeleton :rows="5" animated />
</div>
</div>
</template>
<script setup lang="ts">
const localePath = useLocalePath();
const hydrated = ref(false);
const breadcrumbItems = [
{ label: $t('navigation.home'), to: localePath('/') },
{ label: $t('navigation.about-us') },
];
const { data: companyProfile, pending, error } = await useCompanyProfile();
watch(error, (value) => {
if (value) {
logger.error('数据获取失败: ', value);
}
});
const pageTitle = computed(() => $t('page-title.about-us'));
useHead({
title: pageTitle,
});
onMounted(() => {
hydrated.value = true;
});
</script>
<style scoped>
.page-container {
padding: 2rem 1rem;
max-width: 1200px;
margin: 0 auto;
}
.breadcrumb {
padding: 1rem 1rem;
}
.content {
padding: 1rem;
margin-bottom: 2rem;
}
:deep(.el-divider__text) {
color: var(--el-color-info);
font-size: 1em;
}
.button-group {
display: flex;
justify-content: left;
margin-top: 2rem;
margin-left: 2rem;
gap: 2rem;
}
.loading {
display: flex;
justify-content: center;
align-items: center;
margin-top: 1rem;
}
@media (max-width: 768px) {
.button-group {
align-items: center;
margin-left: 0;
gap: 0.5rem;
}
}
</style>