Files
jinshen-website/app/pages/about/index.vue
R2m1liA 67629ed518
All checks were successful
deploy to server / build-and-deploy (push) Successful in 3m21s
feat: about页面添加公司地址跳转功能
- 外部链接跳转:点击公司地址时,跳转带外部地图服务商链接
- 智能跳转: 根据用户的连接情况,自动选择google地图或者高德地图
2025-11-18 14:11:43 +08:00

99 lines
2.3 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"
:href="getAutoMappedService"
/>
</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;
}
</style>