From dc90e1045b1b6a914b43c208c5f6891ce30fea48 Mon Sep 17 00:00:00 2001
From: R2m1liA <15258427350@163.com>
Date: Tue, 28 Oct 2025 16:01:34 +0800
Subject: [PATCH 01/10] =?UTF-8?q?refactor:=20=E8=B0=83=E6=95=B4components?=
=?UTF-8?q?=E7=9B=AE=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 将components根据作用范围/可复用性进行分类
---
app/components/{ => pages/products}/SpecTable.vue | 0
app/components/{ => pages/search}/SearchResults.vue | 0
app/components/{ => pages/support}/SupportTabs.vue | 0
app/components/{ => shared}/DocumentList.vue | 0
app/components/{ => shared}/FilePreviewer.vue | 0
app/components/{ => shared}/JinshenFooter.vue | 0
app/components/{ => shared}/JinshenHeader.vue | 0
app/components/{ => shared}/MarkdownRenderer.vue | 0
app/components/{ => shared}/MarkdownTable.vue | 0
app/components/{ => shared}/ProductCard.vue | 0
app/components/{ => shared}/QuestionList.vue | 0
app/components/{ => shared}/SolutionCard.vue | 0
nuxt.config.ts | 7 +++++++
13 files changed, 7 insertions(+)
rename app/components/{ => pages/products}/SpecTable.vue (100%)
rename app/components/{ => pages/search}/SearchResults.vue (100%)
rename app/components/{ => pages/support}/SupportTabs.vue (100%)
rename app/components/{ => shared}/DocumentList.vue (100%)
rename app/components/{ => shared}/FilePreviewer.vue (100%)
rename app/components/{ => shared}/JinshenFooter.vue (100%)
rename app/components/{ => shared}/JinshenHeader.vue (100%)
rename app/components/{ => shared}/MarkdownRenderer.vue (100%)
rename app/components/{ => shared}/MarkdownTable.vue (100%)
rename app/components/{ => shared}/ProductCard.vue (100%)
rename app/components/{ => shared}/QuestionList.vue (100%)
rename app/components/{ => shared}/SolutionCard.vue (100%)
diff --git a/app/components/SpecTable.vue b/app/components/pages/products/SpecTable.vue
similarity index 100%
rename from app/components/SpecTable.vue
rename to app/components/pages/products/SpecTable.vue
diff --git a/app/components/SearchResults.vue b/app/components/pages/search/SearchResults.vue
similarity index 100%
rename from app/components/SearchResults.vue
rename to app/components/pages/search/SearchResults.vue
diff --git a/app/components/SupportTabs.vue b/app/components/pages/support/SupportTabs.vue
similarity index 100%
rename from app/components/SupportTabs.vue
rename to app/components/pages/support/SupportTabs.vue
diff --git a/app/components/DocumentList.vue b/app/components/shared/DocumentList.vue
similarity index 100%
rename from app/components/DocumentList.vue
rename to app/components/shared/DocumentList.vue
diff --git a/app/components/FilePreviewer.vue b/app/components/shared/FilePreviewer.vue
similarity index 100%
rename from app/components/FilePreviewer.vue
rename to app/components/shared/FilePreviewer.vue
diff --git a/app/components/JinshenFooter.vue b/app/components/shared/JinshenFooter.vue
similarity index 100%
rename from app/components/JinshenFooter.vue
rename to app/components/shared/JinshenFooter.vue
diff --git a/app/components/JinshenHeader.vue b/app/components/shared/JinshenHeader.vue
similarity index 100%
rename from app/components/JinshenHeader.vue
rename to app/components/shared/JinshenHeader.vue
diff --git a/app/components/MarkdownRenderer.vue b/app/components/shared/MarkdownRenderer.vue
similarity index 100%
rename from app/components/MarkdownRenderer.vue
rename to app/components/shared/MarkdownRenderer.vue
diff --git a/app/components/MarkdownTable.vue b/app/components/shared/MarkdownTable.vue
similarity index 100%
rename from app/components/MarkdownTable.vue
rename to app/components/shared/MarkdownTable.vue
diff --git a/app/components/ProductCard.vue b/app/components/shared/ProductCard.vue
similarity index 100%
rename from app/components/ProductCard.vue
rename to app/components/shared/ProductCard.vue
diff --git a/app/components/QuestionList.vue b/app/components/shared/QuestionList.vue
similarity index 100%
rename from app/components/QuestionList.vue
rename to app/components/shared/QuestionList.vue
diff --git a/app/components/SolutionCard.vue b/app/components/shared/SolutionCard.vue
similarity index 100%
rename from app/components/SolutionCard.vue
rename to app/components/shared/SolutionCard.vue
diff --git a/nuxt.config.ts b/nuxt.config.ts
index 715fddd..8e12d17 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -18,6 +18,13 @@ export default defineNuxtConfig({
},
},
+ components: [
+ {
+ path: '~/components',
+ pathPrefix: false,
+ },
+ ],
+
runtimeConfig: {
public: {
meili: {
From c6e0ea2a472487ef0f95398c1132d352c710cfd4 Mon Sep 17 00:00:00 2001
From: R2m1liA <15258427350@163.com>
Date: Tue, 28 Oct 2025 16:16:57 +0800
Subject: [PATCH 02/10] =?UTF-8?q?refactor:=20=E5=B0=86=E5=90=84=E4=B8=AA?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E9=9D=A2=E5=8C=85=E5=B1=91=E5=AF=BC?=
=?UTF-8?q?=E8=88=AA=E6=8F=90=E5=8F=96=E4=B8=BA=E5=8D=95=E7=8B=AC=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6AppBreadcrumb?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/components/shared/AppBreadcrumb.vue | 21 ++++++++++++++
app/pages/about/index.vue | 18 ++++--------
app/pages/download/[id].vue | 19 +++++--------
app/pages/products/[...slug].vue | 35 ++++++++++-------------
app/pages/products/index.vue | 19 +++++--------
app/pages/solutions/[...slug].vue | 37 ++++++++++++-------------
app/pages/solutions/index.vue | 21 +++++---------
app/pages/support/contact-us.vue | 24 +++++-----------
app/pages/support/documents.vue | 25 ++++++-----------
app/pages/support/faq.vue | 26 ++++++-----------
app/pages/support/index.vue | 28 ++++++++-----------
11 files changed, 116 insertions(+), 157 deletions(-)
create mode 100644 app/components/shared/AppBreadcrumb.vue
diff --git a/app/components/shared/AppBreadcrumb.vue b/app/components/shared/AppBreadcrumb.vue
new file mode 100644
index 0000000..f82ce72
--- /dev/null
+++ b/app/components/shared/AppBreadcrumb.vue
@@ -0,0 +1,21 @@
+
+
+
+ {{ item.label }}
+ {{ item.label }}
+
+
+
+
+
diff --git a/app/pages/about/index.vue b/app/pages/about/index.vue
index 70c2b39..e436798 100644
--- a/app/pages/about/index.vue
+++ b/app/pages/about/index.vue
@@ -1,18 +1,7 @@
-
-
-
- {{ $t('navigation.home') }}
-
-
-
-
- {{ $t('navigation.about-us') }}
-
-
-
+
@@ -38,6 +27,11 @@
+
diff --git a/app/components/pages/homepage/HomepageProductSection.vue b/app/components/pages/homepage/HomepageProductSection.vue
new file mode 100644
index 0000000..da4540a
--- /dev/null
+++ b/app/components/pages/homepage/HomepageProductSection.vue
@@ -0,0 +1,176 @@
+
+
+ 推荐产品
+
+ 探索我们的精选产品,满足您的各种需求。无论是创新技术还是经典设计,我们都为您提供优质选择。
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+ {{ item.summary }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/pages/homepage/HomepageSolutionSection.vue b/app/components/pages/homepage/HomepageSolutionSection.vue
new file mode 100644
index 0000000..3144c78
--- /dev/null
+++ b/app/components/pages/homepage/HomepageSolutionSection.vue
@@ -0,0 +1,176 @@
+
+
+ 推荐解决方案
+ 了解我们的定制解决方案,帮助您优化业务流程,提高效率。
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.title }}
+
+
+
+ {{ item.summary }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/pages/index.vue b/app/pages/index.vue
index ae16d45..8cb4b63 100644
--- a/app/pages/index.vue
+++ b/app/pages/index.vue
@@ -1,309 +1,27 @@
-
-
-
-
- 推荐产品
-
- 探索我们的精选产品,满足您的各种需求。无论是创新技术还是经典设计,我们都为您提供优质选择。
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
- {{ item.summary }}
-
-
-
-
-
-
-
-
-
-
-
-
- 推荐解决方案
- 了解我们的定制解决方案,帮助您优化业务流程,提高效率。
-
-
-
-
-
-
-
-
-
-
-
- {{ item.title }}
-
-
-
- {{ item.summary }}
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
From c4e797500f2be930dd145f774154cd86ce454f44 Mon Sep 17 00:00:00 2001
From: R2m1liA <15258427350@163.com>
Date: Wed, 29 Oct 2025 16:08:33 +0800
Subject: [PATCH 05/10] =?UTF-8?q?refactor:=20=E5=B0=86=E6=94=AF=E6=8C=81?=
=?UTF-8?q?=E9=A1=B5=E7=9A=84=E7=9B=B8=E5=85=B3=E9=83=A8=E5=88=86=E6=8F=90?=
=?UTF-8?q?=E5=8F=96=E4=B8=BA=E5=8F=AF=E5=A4=8D=E7=94=A8=E7=9A=84=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- support页的el-card,单独提取为SupportCard组件
---
app/components/pages/support/SupportCard.vue | 96 +++++++++++++
app/pages/support/index.vue | 138 ++++---------------
2 files changed, 125 insertions(+), 109 deletions(-)
create mode 100644 app/components/pages/support/SupportCard.vue
diff --git a/app/components/pages/support/SupportCard.vue b/app/components/pages/support/SupportCard.vue
new file mode 100644
index 0000000..94d5dab
--- /dev/null
+++ b/app/components/pages/support/SupportCard.vue
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+
+
+ 了解更多 >
+
+
+
+
+
+
+
+
+
diff --git a/app/pages/support/index.vue b/app/pages/support/index.vue
index 5c9f137..2051fcc 100644
--- a/app/pages/support/index.vue
+++ b/app/pages/support/index.vue
@@ -12,87 +12,14 @@
-
-
-
-
-
-
-
-
-
- {{ $t('navigation.faq') }}
-
-
-
-
-
-
我们为用户整理了常见问题的答案,帮助您快速解决疑惑。
-
-
-
-
-
- 了解更多 >
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('navigation.documents') }}
-
-
-
-
-
-
我们为用户整理了常见问题的答案,为您快速解决疑惑。
-
-
-
-
-
- 了解更多 >
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('navigation.contact-info') }}
-
-
-
-
-
-
通过电话、邮箱联系我们,我们将现场为您服务。
-
-
-
-
-
- 了解更多 >
-
-
-
-
+
@@ -104,6 +31,27 @@
{ label: $t('navigation.home'), to: localePath('/') },
{ label: $t('navigation.support') },
];
+
+ const supportItems = [
+ {
+ title: $t('navigation.faq'),
+ description: '我们为用户整理了常见问题的答案,帮助您快速解决疑惑。',
+ to: localePath('/support/faq'),
+ iconComponent: ElIconQuestionFilled,
+ },
+ {
+ title: $t('navigation.documents'),
+ description: '我们为用户整理了常见问题的答案,帮助您快速解决疑惑。',
+ to: localePath('/support/documents'),
+ iconComponent: ElIconDocumentChecked,
+ },
+ {
+ title: $t('navigation.contact-info'),
+ description: '通过电话、邮箱联系我们,我们将现场为您服务。',
+ to: localePath('/support/contact-us'),
+ iconComponent: ElIconService,
+ },
+ ];
diff --git a/app/pages/support/documents.vue b/app/pages/support/documents.vue
index 1aa9b51..5639387 100644
--- a/app/pages/support/documents.vue
+++ b/app/pages/support/documents.vue
@@ -9,50 +9,12 @@
{{ $t('navigation.documents') }}
-
-
-
- 产品分类
-
-
-
-
-
- 产品系列
-
-
-
-
-
- 关键词
-
-
-
-
@@ -60,8 +22,6 @@
+
+
diff --git a/app/pages/solutions/[...slug].vue b/app/pages/solutions/[...slug].vue
index 5c40968..138af1a 100644
--- a/app/pages/solutions/[...slug].vue
+++ b/app/pages/solutions/[...slug].vue
@@ -5,21 +5,7 @@
-
-
-
{{ solution.title }}
-
-
- CreatedAt:
- {{ new Date(solution.createAt).toLocaleDateString() }}
-
-
-
-
{{ solution.summary }}
-
-
-
-
+
Date: Wed, 29 Oct 2025 17:19:49 +0800
Subject: [PATCH 08/10] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E4=BA=A7?=
=?UTF-8?q?=E5=93=81=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 将产品详情页的相关部分提取为ProductHeader与ProductDetail两个组件
---
.../pages/products/ProductDetail.vue | 45 ++++++
.../pages/products/ProductHeader.vue | 102 +++++++++++++
app/pages/products/[...slug].vue | 137 +-----------------
3 files changed, 149 insertions(+), 135 deletions(-)
create mode 100644 app/components/pages/products/ProductDetail.vue
create mode 100644 app/components/pages/products/ProductHeader.vue
diff --git a/app/components/pages/products/ProductDetail.vue b/app/components/pages/products/ProductDetail.vue
new file mode 100644
index 0000000..84ba87f
--- /dev/null
+++ b/app/components/pages/products/ProductDetail.vue
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/pages/products/ProductHeader.vue b/app/components/pages/products/ProductHeader.vue
new file mode 100644
index 0000000..9c256fa
--- /dev/null
+++ b/app/components/pages/products/ProductHeader.vue
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
diff --git a/app/pages/products/[...slug].vue b/app/pages/products/[...slug].vue
index 2fbfe71..7a670c9 100644
--- a/app/pages/products/[...slug].vue
+++ b/app/pages/products/[...slug].vue
@@ -4,66 +4,10 @@
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -90,8 +34,6 @@
const route = useRoute();
const localePath = useLocalePath();
- const { getImageUrl } = useDirectusImage();
-
// 获取路由参数
const id = computed(() => route.params.slug as string);
@@ -105,8 +47,6 @@
return toProductView(rawProduct.value);
});
- const activeName = ref('details'); // 默认选中概览标签
-
const breadcrumbItems = computed(() => [
{ label: $t('navigation.home'), to: localePath('/') },
{ label: $t('navigation.products'), to: localePath('/products') },
@@ -142,67 +82,6 @@
padding: 2rem;
}
- .product-header {
- display: grid;
- grid-template-columns: 2fr 1fr;
- gap: 3rem;
- }
-
- .product-image .el-image {
- position: relative;
- width: 100%;
- height: 500px;
- border-radius: 8px;
- }
-
- .product-image-caption {
- position: absolute;
- bottom: 10px;
- /* left: 10%; */
- background-color: rgba(0, 0, 0, 0.2);
- border-radius: 5px;
- padding: 5px 10px;
- text-align: center;
- color: white;
- font-size: 0.8rem;
- }
-
- .product-carousel :deep(.el-carousel__button) {
- /* 指示器按钮样式 */
- width: 8px;
- height: 8px;
- border-radius: 50%;
- background-color: #475669;
- transition: all 0.3s ease;
- }
-
- .product-info h1 {
- margin-top: 2rem;
- margin-bottom: 1rem;
- font-size: 2rem;
- }
-
- .summary {
- color: var(--el-color-info);
- font-size: 1rem;
- line-height: 1.6;
- margin-bottom: 2rem;
- }
-
- .product-tabs ::v-deep(.el-tabs__nav) {
- min-width: 30%;
- float: right;
- }
-
- .product-tabs ::v-deep(.el-tabs__content) {
- padding: 10px;
- }
-
- .product-content h2 {
- color: var(--el-text-color-primary);
- margin: 0;
- }
-
.loading {
display: flex;
justify-content: center;
@@ -216,16 +95,4 @@
align-items: center;
min-height: 400px;
}
-
- /* 响应式设计 */
- @media (max-width: 768px) {
- .product-header {
- grid-template-columns: 1fr;
- gap: 2rem;
- }
-
- .product-info h1 {
- font-size: 2rem;
- }
- }
From 667413dd127fb1bd28f3370856963c8a9a7deb8d Mon Sep 17 00:00:00 2001
From: R2m1liA <15258427350@163.com>
Date: Wed, 29 Oct 2025 17:33:20 +0800
Subject: [PATCH 09/10] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E4=B8=8B?=
=?UTF-8?q?=E8=BD=BD=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 将download页的文件卡片单独提取为FileCard
---
app/components/pages/download/FileCard.vue | 83 ++++++++++++++++++++++
app/pages/download/[id].vue | 72 +------------------
2 files changed, 86 insertions(+), 69 deletions(-)
create mode 100644 app/components/pages/download/FileCard.vue
diff --git a/app/components/pages/download/FileCard.vue b/app/components/pages/download/FileCard.vue
new file mode 100644
index 0000000..6ed83e5
--- /dev/null
+++ b/app/components/pages/download/FileCard.vue
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
- 类型:
+ - {{ file.type }}
+
+
+
- 大小:
+ - {{ formatFileSize(file.filesize) }}
+
+
+
- 上传时间:
+ -
+ {{ new Date(file.uploaded_on).toLocaleDateString() }}
+
+
+
+
+
+ 下载
+ 预览
+
+
+
+
+
+
+
+
diff --git a/app/pages/download/[id].vue b/app/pages/download/[id].vue
index fed2219..dfff6a3 100644
--- a/app/pages/download/[id].vue
+++ b/app/pages/download/[id].vue
@@ -5,40 +5,7 @@
-
-
-
-
-
-
-
- 类型:
- - {{ file.type }}
-
-
-
- 大小:
- - {{ formatFileSize(file.filesize) }}
-
-
-
- 上传时间:
- -
- {{ new Date(file.uploaded_on).toLocaleDateString() }}
-
-
-
-
-
- 下载
- 预览
-
-
-
+
@@ -48,7 +15,6 @@
From 84b99deef68e126b061d36be2f938b1b0f8df8f9 Mon Sep 17 00:00:00 2001
From: R2m1liA <15258427350@163.com>
Date: Wed, 29 Oct 2025 17:49:20 +0800
Subject: [PATCH 10/10] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E6=90=9C?=
=?UTF-8?q?=E7=B4=A2=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 提取页面部分为SearchHeader与SearchTabs组件
---
app/components/pages/search/SearchHeader.vue | 78 ++++++++++
app/components/pages/search/SearchTabs.vue | 49 ++++++
app/pages/search.vue | 148 +------------------
3 files changed, 129 insertions(+), 146 deletions(-)
create mode 100644 app/components/pages/search/SearchHeader.vue
create mode 100644 app/components/pages/search/SearchTabs.vue
diff --git a/app/components/pages/search/SearchHeader.vue b/app/components/pages/search/SearchHeader.vue
new file mode 100644
index 0000000..61ec4de
--- /dev/null
+++ b/app/components/pages/search/SearchHeader.vue
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
diff --git a/app/components/pages/search/SearchTabs.vue b/app/components/pages/search/SearchTabs.vue
new file mode 100644
index 0000000..c9c5cc1
--- /dev/null
+++ b/app/components/pages/search/SearchTabs.vue
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
diff --git a/app/pages/search.vue b/app/pages/search.vue
index fc9404f..f824f41 100644
--- a/app/pages/search.vue
+++ b/app/pages/search.vue
@@ -1,80 +1,10 @@
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
- import { Search } from '@element-plus/icons-vue';
-
// i18n相关
const { t } = useI18n();
const { getDirectusLocale } = useLocalizations();
@@ -97,8 +25,6 @@
// 路由相关
const route = useRoute();
- const router = useRouter();
- const localePath = useLocalePath();
// 搜索相关
const { search } = useMeilisearch();
@@ -144,44 +70,10 @@
})
);
- console.log(searchItems.value);
-
- // 分类控制
- const activeTab = ref('all');
- const resultCount = computed(() => {
- const map: Record = { all: searchItems.value.length };
- for (const item of searchItems.value) {
- map[item.type] = (map[item.type] ?? 0) + 1;
- }
- return map;
- });
-
- // 分页控制
- const currentPage = ref(1);
-
const hasResults = computed(() =>
filteredSections.value.some((section) => section.hits.length > 0)
);
- const navigateToQuery = (value: string) => {
- const trimmed = value.trim();
- if (!trimmed) return;
- navigateTo({
- path: localePath('/search'),
- query: { query: trimmed },
- });
- };
-
- const handleClear = () => {
- keyword.value = '';
- sections.value = [];
- router.replace(localePath({ path: '/search' }));
- };
-
- watch(activeTab, () => {
- currentPage.value = 1; // 重置页码
- });
-
watch(
() => route.query.query,
async (newQuery) => {
@@ -216,42 +108,6 @@
min-height: 70vh;
}
- .search-header {
- display: flex;
- flex-direction: column;
- gap: 1rem;
- margin-bottom: 2rem;
- }
-
- .page-title {
- font-size: 2.25rem;
- font-weight: 600;
- color: var(--el-text-color-primary);
- }
-
- .search-bar {
- display: flex;
- gap: 1rem;
- align-items: center;
- font-size: 16px;
- }
-
- .search-input {
- flex: 1;
- height: 50px;
- }
-
- .search-button {
- height: 50px;
- width: 100px;
- font-size: 16px;
- }
-
- .search-meta {
- font-size: 0.9rem;
- color: var(--el-text-color-secondary);
- }
-
.search-state {
display: flex;
justify-content: center;