style: 调整代码格式
- 根据ESLint文件规范格式化app文件夹中的代码
This commit is contained in:
@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<main p="x4 y10" text="center teal-700 dark:gray-200">
|
||||
<main p="x4 y10" text="center teal-700 dark:gray-200">
|
||||
<div text4xl>
|
||||
<div i-ep-warning inline-block />
|
||||
<div i-ep-warning inline-block />
|
||||
</div>
|
||||
<div>{{ $t('not-found') }}</div>
|
||||
<div>{{ $t("not-found") }}</div>
|
||||
<div>
|
||||
<button text-sm btn m="3 t8" @click="router.back()">
|
||||
{{ $t('back') }}
|
||||
</button>
|
||||
<button text-sm btn m="3 t8" @click="router.back()">
|
||||
{{ $t("back") }}
|
||||
</button>
|
||||
</div>
|
||||
</main>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const router = useRouter()
|
||||
</script>
|
||||
const router = useRouter();
|
||||
</script>
|
||||
|
||||
@ -1,125 +1,129 @@
|
||||
<template>
|
||||
<div class="page-container">
|
||||
<div v-if="content">
|
||||
<el-breadcrumb class="breadcrumb" separator="/">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">
|
||||
{{ $t('navigation.home') }}
|
||||
</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/about')">
|
||||
{{ $t('navigation.about-us') }}
|
||||
</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<div class="page-container">
|
||||
<div v-if="content">
|
||||
<el-breadcrumb class="breadcrumb" separator="/">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">
|
||||
{{ $t("navigation.home") }}
|
||||
</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/about')">
|
||||
{{ $t("navigation.about-us") }}
|
||||
</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
|
||||
<div class="content">
|
||||
<markdown-renderer :content="content || ''" />
|
||||
</div>
|
||||
<div class="content">
|
||||
<markdown-renderer :content="content || ''" />
|
||||
</div>
|
||||
|
||||
<el-divider content-position="left">更多信息</el-divider>
|
||||
<div class="button-group">
|
||||
<NuxtLink :to="$localePath('/support/contact-us')">
|
||||
<el-card class="card-button">
|
||||
<el-icon class="icon" size="80">
|
||||
<ElIconService />
|
||||
</el-icon>
|
||||
<br>
|
||||
联系信息
|
||||
</el-card>
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="loading">
|
||||
<el-skeleton :rows="5" animated />
|
||||
</div>
|
||||
<el-divider content-position="left">更多信息</el-divider>
|
||||
<div class="button-group">
|
||||
<NuxtLink :to="$localePath('/support/contact-us')">
|
||||
<el-card class="card-button">
|
||||
<el-icon class="icon" size="80">
|
||||
<ElIconService />
|
||||
</el-icon>
|
||||
<br>
|
||||
联系信息
|
||||
</el-card>
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="loading">
|
||||
<el-skeleton :rows="5" animated />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const { findOne } = useStrapi()
|
||||
const { getStrapiLocale } = useLocalizations()
|
||||
const { findOne } = useStrapi();
|
||||
const { getStrapiLocale } = useLocalizations();
|
||||
|
||||
const strapiLocale = getStrapiLocale()
|
||||
const strapiLocale = getStrapiLocale();
|
||||
|
||||
const content = ref<string | null>(null)
|
||||
const content = ref<string | null>(null);
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const response = await findOne<StrapiCompanyProfile>('company-profile', undefined, {
|
||||
locale: strapiLocale,
|
||||
})
|
||||
if (response.data) {
|
||||
content.value = response.data.content || ''
|
||||
} else {
|
||||
console.warn('No company profile data found')
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch company profile:', error)
|
||||
try {
|
||||
const response = await findOne<StrapiCompanyProfile>(
|
||||
"company-profile",
|
||||
undefined,
|
||||
{
|
||||
locale: strapiLocale,
|
||||
}
|
||||
);
|
||||
if (response.data) {
|
||||
content.value = response.data.content || "";
|
||||
} else {
|
||||
console.warn("No company profile data found");
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch company profile:", error);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page-container {
|
||||
padding: 2rem 1rem;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem 1rem;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
padding: 1rem 1rem;
|
||||
padding: 1rem 1rem;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 1rem;
|
||||
margin-bottom: 2rem;
|
||||
padding: 1rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
:deep(.markdown-body p) {
|
||||
text-indent: 2em;
|
||||
text-indent: 2em;
|
||||
}
|
||||
|
||||
:deep(.markdown-body h2) {
|
||||
text-align: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
:deep(.el-divider__text) {
|
||||
color: var(--el-color-info);
|
||||
font-size: 1em;
|
||||
color: var(--el-color-info);
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.button-group {
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
margin-top: 2rem;
|
||||
margin-left: 2rem;
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
margin-top: 2rem;
|
||||
margin-left: 2rem;
|
||||
}
|
||||
|
||||
.card-button {
|
||||
width: 20%;
|
||||
min-width: 200px;
|
||||
padding: 20px;
|
||||
margin: 0 auto;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
font-size: 1.5em;
|
||||
width: 20%;
|
||||
min-width: 200px;
|
||||
padding: 20px;
|
||||
margin: 0 auto;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.card-button:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.icon {
|
||||
padding: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.loading {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 1rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -1,28 +1,62 @@
|
||||
<template>
|
||||
<div class="homepage">
|
||||
<div v-if="!pending" class="carousel">
|
||||
<el-carousel class="homepage-carousel" height="auto" :interval="5000" arrow="never" autoplay>
|
||||
<el-carousel
|
||||
class="homepage-carousel"
|
||||
height="auto"
|
||||
:interval="5000"
|
||||
arrow="never"
|
||||
autoplay
|
||||
>
|
||||
<el-carousel-item v-for="(item, index) in carouselImages" :key="index">
|
||||
<div class="carousel-item">
|
||||
<el-image class="carousel-image" :src="useStrapiMedia(item.url || '')"
|
||||
:alt="item.alternativeText || `Carousel Image ${index + 1}`" fit="contain" lazy />
|
||||
<p v-if="item.caption" class="carousel-image-caption">{{ item.caption }}</p>
|
||||
<el-image
|
||||
class="carousel-image"
|
||||
:src="useStrapiMedia(item.url || '')"
|
||||
:alt="item.alternativeText || `Carousel Image ${index + 1}`"
|
||||
fit="contain"
|
||||
lazy
|
||||
/>
|
||||
<p v-if="item.caption" class="carousel-image-caption">
|
||||
{{ item.caption }}
|
||||
</p>
|
||||
</div>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<section>
|
||||
<h2>推荐产品</h2>
|
||||
<p>探索我们的精选产品,满足您的各种需求。无论是创新技术还是经典设计,我们都为您提供优质选择。</p>
|
||||
<el-carousel class="recommend-carousel" height="auto" arrow="never" indicator-position="outside"
|
||||
:autoplay="false">
|
||||
<el-carousel-item v-for="n in Math.floor(recommend_productions.length / 3) + 1" :key="n"
|
||||
class="recommend-list">
|
||||
<p>
|
||||
探索我们的精选产品,满足您的各种需求。无论是创新技术还是经典设计,我们都为您提供优质选择。
|
||||
</p>
|
||||
<el-carousel
|
||||
class="recommend-carousel"
|
||||
height="auto"
|
||||
arrow="never"
|
||||
indicator-position="outside"
|
||||
:autoplay="false"
|
||||
>
|
||||
<el-carousel-item
|
||||
v-for="n in Math.floor(recommend_productions.length / 3) + 1"
|
||||
:key="n"
|
||||
class="recommend-list"
|
||||
>
|
||||
<div class="recommend-card-group">
|
||||
<el-card v-for="(item, index) in recommend_productions.slice((n - 1) * 3, n * 3)" :key="index"
|
||||
class="recommend-card" @click="handleProductionCardClick(item.documentId || '')">
|
||||
<el-card
|
||||
v-for="(item, index) in recommend_productions.slice(
|
||||
(n - 1) * 3,
|
||||
n * 3
|
||||
)"
|
||||
:key="index"
|
||||
class="recommend-card"
|
||||
@click="handleProductionCardClick(item.documentId || '')"
|
||||
>
|
||||
<template #header>
|
||||
<el-image :src="useStrapiMedia(item.cover?.url || '')"
|
||||
:alt="item.cover?.alternativeText || item.title" fit="cover" lazy />
|
||||
<el-image
|
||||
:src="useStrapiMedia(item.cover?.url || '')"
|
||||
:alt="item.cover?.alternativeText || item.title"
|
||||
fit="cover"
|
||||
lazy
|
||||
/>
|
||||
</template>
|
||||
<div class="recommend-card-body">
|
||||
<!-- Title -->
|
||||
@ -30,7 +64,9 @@
|
||||
<span class="recommend-card-title">{{ item.title }}</span>
|
||||
</div>
|
||||
<!-- Description -->
|
||||
<div class="recommend-card-description text-left opacity-25">{{ item.summary }}</div>
|
||||
<div class="recommend-card-description text-left opacity-25">
|
||||
{{ item.summary }}
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
@ -40,15 +76,35 @@
|
||||
<section>
|
||||
<h2>推荐解决方案</h2>
|
||||
<p>了解我们的定制解决方案,帮助您优化业务流程,提高效率。</p>
|
||||
<el-carousel class="recommend-carousel" height="auto" arrow="never" indicator-position="outside"
|
||||
:autoplay="false">
|
||||
<el-carousel-item v-for="n in Math.floor(recommend_solutions.length / 3) + 1" :key="n" class="recommend-list">
|
||||
<el-carousel
|
||||
class="recommend-carousel"
|
||||
height="auto"
|
||||
arrow="never"
|
||||
indicator-position="outside"
|
||||
:autoplay="false"
|
||||
>
|
||||
<el-carousel-item
|
||||
v-for="n in Math.floor(recommend_solutions.length / 3) + 1"
|
||||
:key="n"
|
||||
class="recommend-list"
|
||||
>
|
||||
<div class="recommend-card-group">
|
||||
<el-card v-for="(item, index) in recommend_solutions.slice((n - 1) * 3, n * 3)" :key="index"
|
||||
class="recommend-card" @click="handleSolutionCardClick(item.documentId || '')">
|
||||
<el-card
|
||||
v-for="(item, index) in recommend_solutions.slice(
|
||||
(n - 1) * 3,
|
||||
n * 3
|
||||
)"
|
||||
:key="index"
|
||||
class="recommend-card"
|
||||
@click="handleSolutionCardClick(item.documentId || '')"
|
||||
>
|
||||
<template #header>
|
||||
<el-image :src="useStrapiMedia(item.cover?.url || '')"
|
||||
:alt="item.cover?.alternativeText || item.title" fit="cover" lazy />
|
||||
<el-image
|
||||
:src="useStrapiMedia(item.cover?.url || '')"
|
||||
:alt="item.cover?.alternativeText || item.title"
|
||||
fit="cover"
|
||||
lazy
|
||||
/>
|
||||
</template>
|
||||
<div class="recommend-card-body">
|
||||
<!-- Title -->
|
||||
@ -56,13 +112,14 @@
|
||||
<span class="recommend-card-title">{{ item.title }}</span>
|
||||
</div>
|
||||
<!-- Description -->
|
||||
<div class="recommend-card-description text-left opacity-25">{{ item.summary }}</div>
|
||||
<div class="recommend-card-description text-left opacity-25">
|
||||
{{ item.summary }}
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
<div v-else class="loading">
|
||||
@ -72,72 +129,71 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const { findOne } = useStrapi()
|
||||
const { getStrapiLocale } = useLocalizations()
|
||||
const strapiLocale = getStrapiLocale()
|
||||
const { findOne } = useStrapi();
|
||||
const { getStrapiLocale } = useLocalizations();
|
||||
const strapiLocale = getStrapiLocale();
|
||||
|
||||
const carouselImages = ref<StrapiImage[]>([])
|
||||
const recommend_productions = ref<Production[]>([])
|
||||
const recommend_solutions = ref<Solution[]>([])
|
||||
const carouselImages = ref<StrapiImage[]>([]);
|
||||
const recommend_productions = ref<Production[]>([]);
|
||||
const recommend_solutions = ref<Solution[]>([]);
|
||||
|
||||
const pending = ref(true)
|
||||
const pending = ref(true);
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const response = await findOne<StrapiHomepage>('homepage', undefined, {
|
||||
const response = await findOne<StrapiHomepage>("homepage", undefined, {
|
||||
populate: {
|
||||
carousel: {
|
||||
populate: '*',
|
||||
populate: "*",
|
||||
},
|
||||
recommend_productions: {
|
||||
populate: {
|
||||
cover: {
|
||||
populate: '*',
|
||||
populate: "*",
|
||||
},
|
||||
},
|
||||
},
|
||||
recommend_solutions: {
|
||||
populate: {
|
||||
cover: {
|
||||
populate: '*',
|
||||
populate: "*",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
locale: strapiLocale,
|
||||
})
|
||||
});
|
||||
if (response.data) {
|
||||
carouselImages.value = response.data.carousel || []
|
||||
recommend_productions.value = response.data.recommend_productions || []
|
||||
recommend_solutions.value = response.data.recommend_solutions || []
|
||||
console.log('推荐产品:', recommend_productions.value)
|
||||
console.log('推荐解决方案:', recommend_solutions.value)
|
||||
carouselImages.value = response.data.carousel || [];
|
||||
recommend_productions.value = response.data.recommend_productions || [];
|
||||
recommend_solutions.value = response.data.recommend_solutions || [];
|
||||
console.log("推荐产品:", recommend_productions.value);
|
||||
console.log("推荐解决方案:", recommend_solutions.value);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error fetching homepage data:', error)
|
||||
console.error("Error fetching homepage data:", error);
|
||||
} finally {
|
||||
pending.value = false
|
||||
pending.value = false;
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
const handleProductionCardClick = (documentId: string) => {
|
||||
// 使用路由导航到产品详情页
|
||||
if (documentId) {
|
||||
const localePath = useLocalePath()
|
||||
const router = useRouter()
|
||||
router.push(localePath(`/productions/${documentId}`))
|
||||
const localePath = useLocalePath();
|
||||
const router = useRouter();
|
||||
router.push(localePath(`/productions/${documentId}`));
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const handleSolutionCardClick = (documentId: string) => {
|
||||
// 使用路由导航到解决方案详情页
|
||||
if (documentId) {
|
||||
const localePath = useLocalePath()
|
||||
const router = useRouter()
|
||||
router.push(localePath(`/solutions/${documentId}`))
|
||||
const localePath = useLocalePath();
|
||||
const router = useRouter();
|
||||
router.push(localePath(`/solutions/${documentId}`));
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@ -157,7 +213,6 @@ section p {
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
|
||||
.homepage-carousel .el-carousel__item {
|
||||
width: 100%;
|
||||
height: 33vw;
|
||||
@ -220,7 +275,6 @@ section p {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
||||
.recommend-card {
|
||||
width: 33%;
|
||||
transition: all 0.3s ease;
|
||||
@ -237,7 +291,6 @@ section p {
|
||||
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
|
||||
.recommend-card-body {
|
||||
margin: 10px auto;
|
||||
padding: 0px auto;
|
||||
@ -257,4 +310,4 @@ section p {
|
||||
width: 100%;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -4,23 +4,51 @@
|
||||
<!-- 面包屑导航 -->
|
||||
<el-breadcrumb class="breadcrumb" separator="/">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">{{ $t('navigation.home') }}</NuxtLink>
|
||||
<NuxtLink :to="$localePath('/')">{{
|
||||
$t("navigation.home")
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/productions')">{{ $t('navigation.productions') }}</NuxtLink>
|
||||
<NuxtLink :to="$localePath('/productions')">{{
|
||||
$t("navigation.productions")
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opactiy-50">{{ production.title }}</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opactiy-50">{{
|
||||
production.title
|
||||
}}</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
|
||||
<!-- 产品详情内容 -->
|
||||
<div class="production-header">
|
||||
<div class="production-image">
|
||||
<el-image v-if="production.production_images.length <= 1" :src="useStrapiMedia(production?.cover?.url || '')" :alt="production.title" fit="contain" />
|
||||
<el-carousel v-else class="production-carousel" height="500px" :autoplay="false" :loop="false" arrow="always">
|
||||
<el-carousel-item v-for="(item, index) in production.production_images || []" :key="index">
|
||||
<el-image
|
||||
v-if="production.production_images.length <= 1"
|
||||
:src="useStrapiMedia(production?.cover?.url || '')"
|
||||
:alt="production.title"
|
||||
fit="contain"
|
||||
/>
|
||||
<el-carousel
|
||||
v-else
|
||||
class="production-carousel"
|
||||
height="500px"
|
||||
:autoplay="false"
|
||||
:loop="false"
|
||||
arrow="always"
|
||||
>
|
||||
<el-carousel-item
|
||||
v-for="(item, index) in production.production_images || []"
|
||||
:key="index"
|
||||
>
|
||||
<div class="production-carousel-item">
|
||||
<el-image :src="useStrapiMedia(item.url || '')" :alt="item.alternativeText || production.title" fit="contain" lazy />
|
||||
<p v-if="item.caption" class="production-image-caption">{{ item.caption }}</p>
|
||||
<el-image
|
||||
:src="useStrapiMedia(item.url || '')"
|
||||
:alt="item.alternativeText || production.title"
|
||||
fit="contain"
|
||||
lazy
|
||||
/>
|
||||
<p v-if="item.caption" class="production-image-caption">
|
||||
{{ item.caption }}
|
||||
</p>
|
||||
</div>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
@ -44,7 +72,12 @@
|
||||
<question-list :questions="production.questions" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="相关文档" name="documents">
|
||||
<document-list :documents="production.production_documents.map(item => item.document) || []" />
|
||||
<document-list
|
||||
:documents="
|
||||
production.production_documents.map((item) => item.document) ||
|
||||
[]
|
||||
"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
@ -62,10 +95,14 @@
|
||||
|
||||
<!-- 未找到产品 -->
|
||||
<div v-else class="not-found">
|
||||
<el-result icon="warning" :title="$t('product-not-found')" :sub-title="$t('product-not-found-desc')">
|
||||
<el-result
|
||||
icon="warning"
|
||||
:title="$t('product-not-found')"
|
||||
:sub-title="$t('product-not-found-desc')"
|
||||
>
|
||||
<template #extra>
|
||||
<el-button type="primary" @click="$router.push('/productions')">
|
||||
{{ $t('back-to-productions') }}
|
||||
{{ $t("back-to-productions") }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-result>
|
||||
@ -74,65 +111,69 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const route = useRoute()
|
||||
const { findOne } = useStrapi()
|
||||
const { getStrapiLocale } = useLocalizations()
|
||||
const strapiLocale = getStrapiLocale()
|
||||
const route = useRoute();
|
||||
const { findOne } = useStrapi();
|
||||
const { getStrapiLocale } = useLocalizations();
|
||||
const strapiLocale = getStrapiLocale();
|
||||
|
||||
const production = ref<Production | null>(null)
|
||||
const pending = ref(true)
|
||||
const production = ref<Production | null>(null);
|
||||
const pending = ref(true);
|
||||
|
||||
const activeName = ref('details') // 默认选中概览标签
|
||||
const activeName = ref("details"); // 默认选中概览标签
|
||||
|
||||
// 获取路由参数(slug 或 id)
|
||||
const documentId = computed(() => route.params.slug as string)
|
||||
const documentId = computed(() => route.params.slug as string);
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const response = await findOne<Production>('productions', documentId.value, {
|
||||
populate: {
|
||||
production_specs: {
|
||||
populate: '*',
|
||||
const response = await findOne<Production>(
|
||||
"productions",
|
||||
documentId.value,
|
||||
{
|
||||
populate: {
|
||||
production_specs: {
|
||||
populate: "*",
|
||||
},
|
||||
production_images: {
|
||||
populate: "*",
|
||||
},
|
||||
cover: {
|
||||
populate: "*",
|
||||
},
|
||||
questions: {
|
||||
populate: "*",
|
||||
},
|
||||
production_documents: {
|
||||
populate: "document",
|
||||
},
|
||||
},
|
||||
production_images: {
|
||||
populate: '*',
|
||||
},
|
||||
cover: {
|
||||
populate: '*',
|
||||
},
|
||||
questions: {
|
||||
populate: '*',
|
||||
},
|
||||
production_documents: {
|
||||
populate: 'document',
|
||||
},
|
||||
},
|
||||
locale: strapiLocale,
|
||||
})
|
||||
locale: strapiLocale,
|
||||
}
|
||||
);
|
||||
if (response.data) {
|
||||
const item = response.data
|
||||
const item = response.data;
|
||||
production.value = {
|
||||
...item,
|
||||
}
|
||||
console.log('Fetched production:', production.value)
|
||||
};
|
||||
console.log("Fetched production:", production.value);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch production:', error)
|
||||
console.error("Failed to fetch production:", error);
|
||||
} finally {
|
||||
pending.value = false
|
||||
pending.value = false;
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
// SEO
|
||||
useHead({
|
||||
title: computed(() => production.value?.title || 'Product Detail'),
|
||||
title: computed(() => production.value?.title || "Product Detail"),
|
||||
meta: [
|
||||
{
|
||||
name: 'description',
|
||||
content: computed(() => production.value?.summary || '')
|
||||
}
|
||||
]
|
||||
})
|
||||
name: "description",
|
||||
content: computed(() => production.value?.summary || ""),
|
||||
},
|
||||
],
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@ -1,143 +1,158 @@
|
||||
<template>
|
||||
<div class="page-container">
|
||||
<div class="page-header">
|
||||
<h1 class="page-title">{{ $t('our-productions') }}</h1>
|
||||
<el-breadcrumb class="breadcrumb">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">{{ $t('navigation.home') }}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/productions')">{{ $t('navigation.productions') }}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<div class="page-content">
|
||||
<div class="productions-container">
|
||||
<el-collapse v-model="activeNames" class="production-collapse">
|
||||
<el-collapse-item v-for="(group, type) in groupedProductions" :key="type" :title="type || '未分类'"
|
||||
:name="type || 'no-category'">
|
||||
<div class="group-list">
|
||||
<production-card v-for="production in group" :key="production.documentId || production.id"
|
||||
:slug="production.documentId" :image-url="useStrapiMedia(production?.cover?.url || '')"
|
||||
:name="production.title" :description="production.summary || ''" />
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-container">
|
||||
<div class="page-header">
|
||||
<h1 class="page-title">{{ $t("our-productions") }}</h1>
|
||||
<el-breadcrumb class="breadcrumb">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">{{
|
||||
$t("navigation.home")
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/productions')">{{
|
||||
$t("navigation.productions")
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<div class="page-content">
|
||||
<div class="productions-container">
|
||||
<el-collapse v-model="activeNames" class="production-collapse">
|
||||
<el-collapse-item
|
||||
v-for="(group, type) in groupedProductions"
|
||||
:key="type"
|
||||
:title="type || '未分类'"
|
||||
:name="type || 'no-category'"
|
||||
>
|
||||
<div class="group-list">
|
||||
<production-card
|
||||
v-for="production in group"
|
||||
:key="production.documentId || production.id"
|
||||
:slug="production.documentId"
|
||||
:image-url="useStrapiMedia(production?.cover?.url || '')"
|
||||
:name="production.title"
|
||||
:description="production.summary || ''"
|
||||
/>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<script setup lang="ts">
|
||||
const { find } = useStrapi()
|
||||
const { getStrapiLocale } = useLocalizations()
|
||||
const { find } = useStrapi();
|
||||
const { getStrapiLocale } = useLocalizations();
|
||||
|
||||
const strapiLocale = getStrapiLocale()
|
||||
const strapiLocale = getStrapiLocale();
|
||||
|
||||
const activeNames = ref<string[]>([])
|
||||
const activeNames = ref<string[]>([]);
|
||||
|
||||
const productions = ref<Production[]>([])
|
||||
const productions = ref<Production[]>([]);
|
||||
|
||||
// 按类型分组
|
||||
// 兼容 production_type 既可能为对象也可能为字符串
|
||||
const groupedProductions = computed(() => {
|
||||
const groups: Record<string, Production[]> = {}
|
||||
for (const prod of productions.value) {
|
||||
let typeKey = ''
|
||||
if (typeof prod.production_type === 'string') {
|
||||
typeKey = prod.production_type
|
||||
} else if (prod.production_type && typeof prod.production_type === 'object' && 'type' in prod.production_type) {
|
||||
typeKey = prod.production_type.type || ''
|
||||
}
|
||||
if (!groups[typeKey]) groups[typeKey] = []
|
||||
groups[typeKey]?.push(prod)
|
||||
const groups: Record<string, Production[]> = {};
|
||||
for (const prod of productions.value) {
|
||||
let typeKey = "";
|
||||
if (typeof prod.production_type === "string") {
|
||||
typeKey = prod.production_type;
|
||||
} else if (
|
||||
prod.production_type &&
|
||||
typeof prod.production_type === "object" &&
|
||||
"type" in prod.production_type
|
||||
) {
|
||||
typeKey = prod.production_type.type || "";
|
||||
}
|
||||
return groups
|
||||
})
|
||||
if (!groups[typeKey]) groups[typeKey] = [];
|
||||
groups[typeKey]?.push(prod);
|
||||
}
|
||||
return groups;
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const response = await find<Production>('productions', {
|
||||
populate: {
|
||||
cover: {
|
||||
populate: '*',
|
||||
},
|
||||
production_type: {
|
||||
populate: '*'
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
show_in_production_list: {
|
||||
$eq: true, // 只获取在产品列表中显示的产品
|
||||
},
|
||||
},
|
||||
locale: strapiLocale,
|
||||
})
|
||||
productions.value = response.data.map((item: Production) => ({
|
||||
...item,
|
||||
// 保持 production_type 原始类型,兼容对象或字符串
|
||||
production_type: item.production_type,
|
||||
}))
|
||||
// 默认展开所有分组
|
||||
activeNames.value = Object.keys(groupedProductions.value)
|
||||
activeNames.value.push('no-category') // 展开未分类
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch productions:', error)
|
||||
}
|
||||
try {
|
||||
const response = await find<Production>("productions", {
|
||||
populate: {
|
||||
cover: {
|
||||
populate: "*",
|
||||
},
|
||||
production_type: {
|
||||
populate: "*",
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
show_in_production_list: {
|
||||
$eq: true, // 只获取在产品列表中显示的产品
|
||||
},
|
||||
},
|
||||
locale: strapiLocale,
|
||||
});
|
||||
productions.value = response.data.map((item: Production) => ({
|
||||
...item,
|
||||
// 保持 production_type 原始类型,兼容对象或字符串
|
||||
production_type: item.production_type,
|
||||
}));
|
||||
// 默认展开所有分组
|
||||
activeNames.value = Object.keys(groupedProductions.value);
|
||||
activeNames.value.push("no-category"); // 展开未分类
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch productions:", error);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page-container {
|
||||
padding: 2rem;
|
||||
margin: 0 auto;
|
||||
max-width: 1200px;
|
||||
padding: 2rem;
|
||||
margin: 0 auto;
|
||||
max-width: 1200px;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
display: flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
color: var(--el-color-primary);
|
||||
margin-bottom: 1rem;
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
color: var(--el-color-primary);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
margin-left: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.productions-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 40px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 40px;
|
||||
}
|
||||
|
||||
.production-group {
|
||||
margin-bottom: 32px;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.group-title {
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 16px;
|
||||
color: var(--el-color-primary);
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 16px;
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
.group-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding-top: 1rem;
|
||||
gap: 20px;
|
||||
justify-content: flex-start;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding-top: 1rem;
|
||||
gap: 20px;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
:deep(.el-collapse-item__header) {
|
||||
padding: 30px auto;
|
||||
font-size: 1.5rem;
|
||||
padding: 30px auto;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -1,124 +1,130 @@
|
||||
<template>
|
||||
<div class="page-container">
|
||||
<div v-if="solution">
|
||||
<div class="page-header">
|
||||
<el-breadcrumb class="breadcrumb" separator="/">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">{{ $t('navigation.home') }}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/solutions')">{{ $t('navigation.solutions') }}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">{{ solution.title }}</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<div class="page-content">
|
||||
<div class="solution-info">
|
||||
<h1>{{ solution.title }}</h1>
|
||||
<div class="solution-meta">
|
||||
<span class="solution-date">
|
||||
CreatedAt: {{ new Date(solution.createdAt).toLocaleDateString() }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="summary">{{ solution.summary }}</p>
|
||||
<div class="solution-content">
|
||||
<markdown-renderer :content="solution.content || ''" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-container">
|
||||
<div v-if="solution">
|
||||
<div class="page-header">
|
||||
<el-breadcrumb class="breadcrumb" separator="/">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">{{
|
||||
$t("navigation.home")
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/solutions')">{{
|
||||
$t("navigation.solutions")
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">{{
|
||||
solution.title
|
||||
}}</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<div class="page-content">
|
||||
<div class="solution-info">
|
||||
<h1>{{ solution.title }}</h1>
|
||||
<div class="solution-meta">
|
||||
<span class="solution-date">
|
||||
CreatedAt: {{ new Date(solution.createdAt).toLocaleDateString() }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="loading">
|
||||
<el-skeleton :rows="5" animated />
|
||||
<p class="summary">{{ solution.summary }}</p>
|
||||
<div class="solution-content">
|
||||
<markdown-renderer :content="solution.content || ''" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="loading">
|
||||
<el-skeleton :rows="5" animated />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const route = useRoute()
|
||||
const { findOne } = useStrapi()
|
||||
const { getStrapiLocale } = useLocalizations()
|
||||
const strapiLocale = getStrapiLocale()
|
||||
const route = useRoute();
|
||||
const { findOne } = useStrapi();
|
||||
const { getStrapiLocale } = useLocalizations();
|
||||
const strapiLocale = getStrapiLocale();
|
||||
|
||||
const solution = ref<Solution | null>(null)
|
||||
const solution = ref<Solution | null>(null);
|
||||
|
||||
// 获取路由参数(documentId)
|
||||
const documentId = computed(() => route.params.slug as string)
|
||||
const documentId = computed(() => route.params.slug as string);
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const response = await findOne<Solution>('solutions', documentId.value, {
|
||||
populate: '*',
|
||||
locale: strapiLocale,
|
||||
})
|
||||
if (response.data) {
|
||||
solution.value = {
|
||||
...response.data,
|
||||
// 确保 solution_type 保持原始类型
|
||||
solution_type: response.data.solution_type,
|
||||
}
|
||||
}
|
||||
console.log('Fetched Solution:', solution.value)
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch solution:', error)
|
||||
try {
|
||||
const response = await findOne<Solution>("solutions", documentId.value, {
|
||||
populate: "*",
|
||||
locale: strapiLocale,
|
||||
});
|
||||
if (response.data) {
|
||||
solution.value = {
|
||||
...response.data,
|
||||
// 确保 solution_type 保持原始类型
|
||||
solution_type: response.data.solution_type,
|
||||
};
|
||||
}
|
||||
})
|
||||
console.log("Fetched Solution:", solution.value);
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch solution:", error);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page-container {
|
||||
padding: 1rem;
|
||||
min-height: 80vh;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 1rem;
|
||||
min-height: 80vh;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
padding: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
padding: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.solution-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.solution-header el-image {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
border-radius: 4px;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.page-content h1 {
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
color: var(--el-color-primary);
|
||||
text-align: center;
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
color: var(--el-color-primary);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.solution-meta {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 1rem;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: 0.8rem;
|
||||
color: var(--el-text-color-secondary);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 1rem;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: 0.8rem;
|
||||
color: var(--el-text-color-secondary);
|
||||
}
|
||||
|
||||
.summary {
|
||||
font-size: 0.8rem;
|
||||
color: var(--el-text-color-secondary);
|
||||
text-align: center;
|
||||
font-size: 0.8rem;
|
||||
color: var(--el-text-color-secondary);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.solution-content {
|
||||
margin-top: 1rem;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.loading {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 1rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -1,127 +1,138 @@
|
||||
<template>
|
||||
<div class="page-container">
|
||||
<div class="page-header">
|
||||
<h1 class="page-title">{{ $t('learn-our-solutions') }}</h1>
|
||||
<el-breadcrumb class="breadcrumb">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">{{ $t('navigation.home') }}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/solutions')">{{ $t('navigation.solutions') }}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<div class="solutions-container">
|
||||
<el-tabs v-model="activeName" class="solutions-tabs">
|
||||
<el-tab-pane :label="$t('all')" name="all">
|
||||
<div class="solution-list">
|
||||
<solution-card
|
||||
v-for="solution in solutions" :key="solution.documentId" :title="solution.title"
|
||||
:summary="solution.summary || ''" :cover-url="useStrapiMedia(solution?.cover?.url || '')"
|
||||
:document-id="solution.documentId" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
v-for="(group, type) in groupedSolutions" :key="type" :label="type || '未分类'"
|
||||
:name="type || 'no-category'"
|
||||
>
|
||||
<div class="solution-list">
|
||||
<solution-card
|
||||
v-for="solution in group"
|
||||
:key="solution.documentId"
|
||||
:document-id="solution.documentId"
|
||||
:cover-url="useStrapiMedia(solution?.cover?.url || '')"
|
||||
:title="solution.title"
|
||||
:summary="solution.summary || ''"
|
||||
/>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div class="page-container">
|
||||
<div class="page-header">
|
||||
<h1 class="page-title">{{ $t("learn-our-solutions") }}</h1>
|
||||
<el-breadcrumb class="breadcrumb">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">{{
|
||||
$t("navigation.home")
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/solutions')">{{
|
||||
$t("navigation.solutions")
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<div class="solutions-container">
|
||||
<el-tabs v-model="activeName" class="solutions-tabs">
|
||||
<el-tab-pane :label="$t('all')" name="all">
|
||||
<div class="solution-list">
|
||||
<solution-card
|
||||
v-for="solution in solutions"
|
||||
:key="solution.documentId"
|
||||
:title="solution.title"
|
||||
:summary="solution.summary || ''"
|
||||
:cover-url="useStrapiMedia(solution?.cover?.url || '')"
|
||||
:document-id="solution.documentId"
|
||||
/>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
v-for="(group, type) in groupedSolutions"
|
||||
:key="type"
|
||||
:label="type || '未分类'"
|
||||
:name="type || 'no-category'"
|
||||
>
|
||||
<div class="solution-list">
|
||||
<solution-card
|
||||
v-for="solution in group"
|
||||
:key="solution.documentId"
|
||||
:document-id="solution.documentId"
|
||||
:cover-url="useStrapiMedia(solution?.cover?.url || '')"
|
||||
:title="solution.title"
|
||||
:summary="solution.summary || ''"
|
||||
/>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const { find } = useStrapi()
|
||||
const { getStrapiLocale } = useLocalizations()
|
||||
const { find } = useStrapi();
|
||||
const { getStrapiLocale } = useLocalizations();
|
||||
|
||||
const strapiLocale = getStrapiLocale()
|
||||
const strapiLocale = getStrapiLocale();
|
||||
|
||||
const activeName = ref<string>('all')
|
||||
const activeName = ref<string>("all");
|
||||
|
||||
const solutions = ref<Solution[]>([])
|
||||
const solutions = ref<Solution[]>([]);
|
||||
|
||||
// 按类型分组
|
||||
const groupedSolutions = computed(() => {
|
||||
const gourps: Record<string, Solution[]> = {}
|
||||
for (const sol of solutions.value) {
|
||||
let typeKey = ''
|
||||
if (typeof sol.solution_type === 'string') {
|
||||
typeKey = sol.solution_type
|
||||
} else if (sol.solution_type && typeof sol.solution_type === 'object' && 'type' in sol.solution_type) {
|
||||
typeKey = sol.solution_type.type || ''
|
||||
}
|
||||
if (!gourps[typeKey]) gourps[typeKey] = []
|
||||
gourps[typeKey]?.push(sol)
|
||||
const gourps: Record<string, Solution[]> = {};
|
||||
for (const sol of solutions.value) {
|
||||
let typeKey = "";
|
||||
if (typeof sol.solution_type === "string") {
|
||||
typeKey = sol.solution_type;
|
||||
} else if (
|
||||
sol.solution_type &&
|
||||
typeof sol.solution_type === "object" &&
|
||||
"type" in sol.solution_type
|
||||
) {
|
||||
typeKey = sol.solution_type.type || "";
|
||||
}
|
||||
return gourps
|
||||
})
|
||||
|
||||
|
||||
if (!gourps[typeKey]) gourps[typeKey] = [];
|
||||
gourps[typeKey]?.push(sol);
|
||||
}
|
||||
return gourps;
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const response = await find<Solution>('solutions', {
|
||||
populate: {
|
||||
cover: {
|
||||
populate: '*',
|
||||
},
|
||||
solution_type: {
|
||||
populate: '*',
|
||||
},
|
||||
},
|
||||
locale: strapiLocale,
|
||||
})
|
||||
solutions.value = response.data.map((item: Solution) => ({
|
||||
...item,
|
||||
solution_type: item.solution_type,
|
||||
}))
|
||||
console.log('Fetched Solutions:', solutions.value)
|
||||
console.log('Grouped Solutions:', groupedSolutions.value)
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch solutions:', error)
|
||||
}
|
||||
})
|
||||
|
||||
try {
|
||||
const response = await find<Solution>("solutions", {
|
||||
populate: {
|
||||
cover: {
|
||||
populate: "*",
|
||||
},
|
||||
solution_type: {
|
||||
populate: "*",
|
||||
},
|
||||
},
|
||||
locale: strapiLocale,
|
||||
});
|
||||
solutions.value = response.data.map((item: Solution) => ({
|
||||
...item,
|
||||
solution_type: item.solution_type,
|
||||
}));
|
||||
console.log("Fetched Solutions:", solutions.value);
|
||||
console.log("Grouped Solutions:", groupedSolutions.value);
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch solutions:", error);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page-container {
|
||||
padding: 2rem;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
display: flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 1rem;
|
||||
color: var(--el-color-primary);
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
margin-bottom: 1rem;
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
margin-left: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.solution-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 1rem;
|
||||
margin-bottom: 2rem;
|
||||
gap: 40px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 1rem;
|
||||
margin-bottom: 2rem;
|
||||
gap: 40px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -1,91 +1,95 @@
|
||||
<template>
|
||||
<div class="page-container">
|
||||
<div v-if="content">
|
||||
<support-tabs model-value="contact-us" />
|
||||
<div class="page-header">
|
||||
<h1 class="page-title">{{ $t('navigation.contact-info') }}</h1>
|
||||
<el-breadcrumb class="breadcrumb" separator="/">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">
|
||||
{{ $t('navigation.home') }}
|
||||
</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/support')">
|
||||
{{ $t('navigation.support') }}
|
||||
</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/support/contact-us')">
|
||||
{{ $t('navigation.contact-info') }}
|
||||
</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<div class="page-container">
|
||||
<div v-if="content">
|
||||
<support-tabs model-value="contact-us" />
|
||||
<div class="page-header">
|
||||
<h1 class="page-title">{{ $t("navigation.contact-info") }}</h1>
|
||||
<el-breadcrumb class="breadcrumb" separator="/">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">
|
||||
{{ $t("navigation.home") }}
|
||||
</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/support')">
|
||||
{{ $t("navigation.support") }}
|
||||
</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/support/contact-us')">
|
||||
{{ $t("navigation.contact-info") }}
|
||||
</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
<markdown-renderer :content="content || ''" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="loading">
|
||||
<el-skeleton :rows="5" animated />
|
||||
</div>
|
||||
<div class="page-content">
|
||||
<markdown-renderer :content="content || ''" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="loading">
|
||||
<el-skeleton :rows="5" animated />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const { findOne } = useStrapi()
|
||||
const { getStrapiLocale } = useLocalizations()
|
||||
const { findOne } = useStrapi();
|
||||
const { getStrapiLocale } = useLocalizations();
|
||||
|
||||
const strapiLocale = getStrapiLocale()
|
||||
const strapiLocale = getStrapiLocale();
|
||||
|
||||
const content = ref<string>('')
|
||||
const content = ref<string>("");
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const response = await findOne<StrapiContactInfo>('contact-info', undefined, {
|
||||
populate: '*',
|
||||
locale: strapiLocale,
|
||||
})
|
||||
if (response.data) {
|
||||
content.value = response.data.content || ''
|
||||
} else {
|
||||
console.warn('No contact info data found')
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch contact info:', error)
|
||||
try {
|
||||
const response = await findOne<StrapiContactInfo>(
|
||||
"contact-info",
|
||||
undefined,
|
||||
{
|
||||
populate: "*",
|
||||
locale: strapiLocale,
|
||||
}
|
||||
);
|
||||
if (response.data) {
|
||||
content.value = response.data.content || "";
|
||||
} else {
|
||||
console.warn("No contact info data found");
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch contact info:", error);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page-container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
display: flex;
|
||||
padding: 2rem 2rem 0rem;
|
||||
display: flex;
|
||||
padding: 2rem 2rem 0rem;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
color: var(--el-color-primary);
|
||||
margin-bottom: 1rem;
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
color: var(--el-color-primary);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
margin-left: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.page-content {
|
||||
padding: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
padding: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
:deep(.markdown-body ul) {
|
||||
list-style-type: none;
|
||||
list-style-type: none;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -1,82 +1,89 @@
|
||||
<template>
|
||||
<div class="page-container">
|
||||
<div v-if="pending">
|
||||
<el-skeleton :rows="5" animated />
|
||||
</div>
|
||||
<div v-else>
|
||||
<support-tabs model-value="documents" />
|
||||
<div class="page-header">
|
||||
<h1 class="page-title">{{ $t('navigation.documents') }}</h1>
|
||||
<el-breadcrumb class="breadcrumb" separator="/">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">{{ $t('navigation.home') }}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/support')">{{ $t('navigation.support') }}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/support/documents')">{{ $t('navigation.documents') }}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<div class="page-content">
|
||||
<document-list :documents="documents" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-container">
|
||||
<div v-if="pending">
|
||||
<el-skeleton :rows="5" animated />
|
||||
</div>
|
||||
<div v-else>
|
||||
<support-tabs model-value="documents" />
|
||||
<div class="page-header">
|
||||
<h1 class="page-title">{{ $t("navigation.documents") }}</h1>
|
||||
<el-breadcrumb class="breadcrumb" separator="/">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">{{
|
||||
$t("navigation.home")
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/support')">{{
|
||||
$t("navigation.support")
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/support/documents')">{{
|
||||
$t("navigation.documents")
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<div class="page-content">
|
||||
<document-list :documents="documents" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const { find } = useStrapi()
|
||||
const { getStrapiLocale } = useLocalizations()
|
||||
const strapiLocale = getStrapiLocale()
|
||||
const { find } = useStrapi();
|
||||
const { getStrapiLocale } = useLocalizations();
|
||||
const strapiLocale = getStrapiLocale();
|
||||
|
||||
const pending = ref(true)
|
||||
const pending = ref(true);
|
||||
|
||||
const documents = ref<StrapiMedia[]>([])
|
||||
const documents = ref<StrapiMedia[]>([]);
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const response = await find<ProductionDocument>('production-documents', {
|
||||
locale: strapiLocale,
|
||||
populate: 'document',
|
||||
})
|
||||
if(response.data) {
|
||||
documents.value = response.data.map(item => ({
|
||||
...item.document,
|
||||
})) || []
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error fetching documents:', error)
|
||||
} finally {
|
||||
pending.value = false
|
||||
try {
|
||||
const response = await find<ProductionDocument>("production-documents", {
|
||||
locale: strapiLocale,
|
||||
populate: "document",
|
||||
});
|
||||
if (response.data) {
|
||||
documents.value =
|
||||
response.data.map((item) => ({
|
||||
...item.document,
|
||||
})) || [];
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
console.error("Error fetching documents:", error);
|
||||
} finally {
|
||||
pending.value = false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page-container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
display: flex;
|
||||
padding: 2rem 2rem 0rem;
|
||||
display: flex;
|
||||
padding: 2rem 2rem 0rem;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
color: var(--el-color-primary);
|
||||
margin-bottom: 1rem;
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
color: var(--el-color-primary);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
margin-left: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.page-content {
|
||||
padding: 1rem 2rem 2rem;
|
||||
padding: 1rem 2rem 2rem;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -1,32 +1,37 @@
|
||||
<template>
|
||||
<div class="page-container">
|
||||
<div v-if="pending" class="flex justify-center items-center h-64">
|
||||
<el-spinner />
|
||||
</div>
|
||||
<div v-else>
|
||||
<support-tabs model-value="faq" />
|
||||
<div class="page-header">
|
||||
<h1 class="page-title">{{ $t('navigation.faq') }}</h1>
|
||||
<el-breadcrumb class="breadcrumb" separator="/">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">{{ $t('navigation.home') }}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/support')">{{ $t('navigation.support') }}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/support/faq')">{{ $t('navigation.faq') }}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<div class="page-content">
|
||||
<question-list :questions="questions" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-container">
|
||||
<div v-if="pending" class="flex justify-center items-center h-64">
|
||||
<el-spinner />
|
||||
</div>
|
||||
<div v-else>
|
||||
<support-tabs model-value="faq" />
|
||||
<div class="page-header">
|
||||
<h1 class="page-title">{{ $t("navigation.faq") }}</h1>
|
||||
<el-breadcrumb class="breadcrumb" separator="/">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">{{
|
||||
$t("navigation.home")
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/support')">{{
|
||||
$t("navigation.support")
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/support/faq')">{{
|
||||
$t("navigation.faq")
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<div class="page-content">
|
||||
<question-list :questions="questions" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script setup lang="ts">
|
||||
const { find } = useStrapi();
|
||||
const { getStrapiLocale } = useLocalizations();
|
||||
@ -37,44 +42,44 @@ const questions = ref<Question[]>([]);
|
||||
const pending = ref(true);
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const faqData = await find<Question>('questions', {
|
||||
locale: strapiLocale,
|
||||
});
|
||||
if (faqData) {
|
||||
questions.value = faqData.data || [];
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch FAQ data:', error);
|
||||
} finally {
|
||||
pending.value = false;
|
||||
try {
|
||||
const faqData = await find<Question>("questions", {
|
||||
locale: strapiLocale,
|
||||
});
|
||||
if (faqData) {
|
||||
questions.value = faqData.data || [];
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch FAQ data:", error);
|
||||
} finally {
|
||||
pending.value = false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page-container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
display: flex;
|
||||
padding: 2rem 2rem 0rem;
|
||||
display: flex;
|
||||
padding: 2rem 2rem 0rem;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
color: var(--el-color-primary);
|
||||
margin-bottom: 1rem;
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
color: var(--el-color-primary);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
margin-left: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.page-content {
|
||||
padding: 1rem 2rem 2rem;
|
||||
padding: 1rem 2rem 2rem;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -1,202 +1,208 @@
|
||||
<template>
|
||||
<div class="page-container">
|
||||
<support-tabs />
|
||||
<div class="page-content">
|
||||
|
||||
<div class="page-header">
|
||||
<h1 class="page-title">{{ $t('navigation.support') }}</h1>
|
||||
<el-breadcrumb class="breadcrumb" separator="/">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">{{ $t('navigation.home') }}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/support')">{{ $t('navigation.support') }}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<div class="page-container">
|
||||
<support-tabs />
|
||||
<div class="page-content">
|
||||
<div class="page-header">
|
||||
<h1 class="page-title">{{ $t("navigation.support") }}</h1>
|
||||
<el-breadcrumb class="breadcrumb" separator="/">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">{{
|
||||
$t("navigation.home")
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/support')">{{
|
||||
$t("navigation.support")
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<section style="margin-bottom: 2rem">
|
||||
<p>
|
||||
金申机械制造有限公司致力于为客户提供优质的产品与服务。针对纸管机、分纸机、纸吸管等产品,我们提供全方位的售后服务,确保客户能够安心地使用我们的产品。
|
||||
</p>
|
||||
</section>
|
||||
<div class="card-group">
|
||||
<el-card class="card">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-icon class="card-icon" size="80">
|
||||
<ElIconQuestionFilled />
|
||||
</el-icon>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<div class="card-title">
|
||||
<span>{{ $t("navigation.faq") }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="card-content">
|
||||
<p>我们为用户整理了常见问题的答案,帮助您快速解决疑惑。</p>
|
||||
</div>
|
||||
<section style="margin-bottom: 2rem;">
|
||||
<p>金申机械制造有限公司致力于为客户提供优质的产品与服务。针对纸管机、分纸机、纸吸管等产品,我们提供全方位的售后服务,确保客户能够安心地使用我们的产品。</p>
|
||||
</section>
|
||||
<div class="card-group">
|
||||
<el-card class="card">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-icon class="card-icon" size="80">
|
||||
<ElIconQuestionFilled />
|
||||
</el-icon>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<div class="card-title">
|
||||
<span>{{ $t('navigation.faq') }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="card-content">
|
||||
<p>我们为用户整理了常见问题的答案,帮助您快速解决疑惑。</p>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<NuxtLink class="card-link" :to="$localePath('/support/faq')">
|
||||
<el-button class="card-button" round>
|
||||
<span>了解更多 > </span>
|
||||
</el-button>
|
||||
</NuxtLink>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card class="card">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-icon class="card-icon" size="80">
|
||||
<ElIconDocumentChecked />
|
||||
</el-icon>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<div class="card-title">
|
||||
<span>{{ $t('navigation.documents') }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="card-content">
|
||||
<p>我们为用户整理了常见问题的答案,为您快速解决疑惑。</p>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<NuxtLink class="card-link" :to="$localePath('/support/documents')">
|
||||
<el-button class="card-button" round>
|
||||
<span>了解更多 > </span>
|
||||
</el-button>
|
||||
</NuxtLink>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card class="card">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-icon class="card-icon" size="80">
|
||||
<ElIconService />
|
||||
</el-icon>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<div class="card-title">
|
||||
<span>{{ $t('navigation.contact-info') }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="card-content">
|
||||
<p>通过电话、邮箱联系我们,我们将现场为您服务。</p>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<NuxtLink class="card-link" :to="$localePath('/support/contact-us')">
|
||||
<el-button class="card-button" round>
|
||||
<span>了解更多 > </span>
|
||||
</el-button>
|
||||
</NuxtLink>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<NuxtLink class="card-link" :to="$localePath('/support/faq')">
|
||||
<el-button class="card-button" round>
|
||||
<span>了解更多 > </span>
|
||||
</el-button>
|
||||
</NuxtLink>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card class="card">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-icon class="card-icon" size="80">
|
||||
<ElIconDocumentChecked />
|
||||
</el-icon>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<div class="card-title">
|
||||
<span>{{ $t("navigation.documents") }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="card-content">
|
||||
<p>我们为用户整理了常见问题的答案,为您快速解决疑惑。</p>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<NuxtLink class="card-link" :to="$localePath('/support/documents')">
|
||||
<el-button class="card-button" round>
|
||||
<span>了解更多 > </span>
|
||||
</el-button>
|
||||
</NuxtLink>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card class="card">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-icon class="card-icon" size="80">
|
||||
<ElIconService />
|
||||
</el-icon>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<div class="card-title">
|
||||
<span>{{ $t("navigation.contact-info") }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="card-content">
|
||||
<p>通过电话、邮箱联系我们,我们将现场为您服务。</p>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<NuxtLink
|
||||
class="card-link"
|
||||
:to="$localePath('/support/contact-us')"
|
||||
>
|
||||
<el-button class="card-button" round>
|
||||
<span>了解更多 > </span>
|
||||
</el-button>
|
||||
</NuxtLink>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
</script>
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style scoped>
|
||||
.page-container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
display: flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
color: var(--el-color-primary);
|
||||
margin-bottom: 1rem;
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
color: var(--el-color-primary);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
margin-left: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.page-content {
|
||||
padding: 1rem 2rem 2rem;
|
||||
padding: 1rem 2rem 2rem;
|
||||
}
|
||||
|
||||
|
||||
section {
|
||||
line-height: 1.6;
|
||||
width: 60%;
|
||||
line-height: 1.6;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.card-group {
|
||||
display: flex;
|
||||
gap: 50px;
|
||||
justify-content: space-around;
|
||||
margin-bottom: 2rem;
|
||||
display: flex;
|
||||
gap: 50px;
|
||||
justify-content: space-around;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.el-card {
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
box-shadow: none;
|
||||
border-radius: 8px;
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
box-shadow: none;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.card-icon {
|
||||
color: var(--el-color-primary);
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
.card-title {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
margin-left: 2rem;
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
color: var(--el-color-primary);
|
||||
display: flex;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
margin-left: 2rem;
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
.card-link {
|
||||
margin-left: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.card-button {
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
font-size: 1rem;
|
||||
color: var(--el-color-primary);
|
||||
transition: all 0.3s ease;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
font-size: 1rem;
|
||||
color: var(--el-color-primary);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.button-group {
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
margin-top: 2rem;
|
||||
margin-left: 2rem;
|
||||
gap: 20px;
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
margin-top: 2rem;
|
||||
margin-left: 2rem;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.el-row:last-child {
|
||||
margin-bottom: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.grid-content {
|
||||
border-radius: 4px;
|
||||
min-height: 36px;
|
||||
border-radius: 4px;
|
||||
min-height: 36px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user