From 7f5ae85d3457a2c4b8371320056f5e269123d055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Fri, 21 Nov 2025 15:35:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=87=8D=E6=9E=84=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=B9=B6=E6=B7=BB=E5=8A=A0=E5=9B=BD=E9=99=85=E5=8C=96=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 完全重构首页布局,添加轮播图、公司介绍、产品中心等模块 - 新增多个关于页面路由结构 - 调整国际化配置,移除日语支持并更新翻译文本 - 优化导航菜单和页脚内容 --- app/[locale]/about/arch/page.tsx | 0 app/[locale]/about/base/page.tsx | 0 app/[locale]/about/course/page.tsx | 0 app/[locale]/about/culture/page.tsx | 0 app/[locale]/about/green/page.tsx | 0 app/[locale]/about/honor/page.tsx | 0 app/[locale]/about/introduction/page.tsx | 0 components/home/index.tsx | 516 ++++++++++++++++++++--- i18n/messages/en.json | 34 +- i18n/messages/ja.json | 2 +- i18n/messages/vi.json | 39 +- i18n/messages/zh.json | 52 ++- i18n/request.ts | 2 - i18n/routing.ts | 3 +- 14 files changed, 490 insertions(+), 158 deletions(-) create mode 100644 app/[locale]/about/arch/page.tsx create mode 100644 app/[locale]/about/base/page.tsx create mode 100644 app/[locale]/about/course/page.tsx create mode 100644 app/[locale]/about/culture/page.tsx create mode 100644 app/[locale]/about/green/page.tsx create mode 100644 app/[locale]/about/honor/page.tsx create mode 100644 app/[locale]/about/introduction/page.tsx diff --git a/app/[locale]/about/arch/page.tsx b/app/[locale]/about/arch/page.tsx new file mode 100644 index 0000000..e69de29 diff --git a/app/[locale]/about/base/page.tsx b/app/[locale]/about/base/page.tsx new file mode 100644 index 0000000..e69de29 diff --git a/app/[locale]/about/course/page.tsx b/app/[locale]/about/course/page.tsx new file mode 100644 index 0000000..e69de29 diff --git a/app/[locale]/about/culture/page.tsx b/app/[locale]/about/culture/page.tsx new file mode 100644 index 0000000..e69de29 diff --git a/app/[locale]/about/green/page.tsx b/app/[locale]/about/green/page.tsx new file mode 100644 index 0000000..e69de29 diff --git a/app/[locale]/about/honor/page.tsx b/app/[locale]/about/honor/page.tsx new file mode 100644 index 0000000..e69de29 diff --git a/app/[locale]/about/introduction/page.tsx b/app/[locale]/about/introduction/page.tsx new file mode 100644 index 0000000..e69de29 diff --git a/components/home/index.tsx b/components/home/index.tsx index c5ce638..328ba97 100644 --- a/components/home/index.tsx +++ b/components/home/index.tsx @@ -1,75 +1,467 @@ 'use client' -import { Button } from "@/components/ui/button"; -import { siteConfig } from "@/config/site"; -import { MousePointerClick } from "lucide-react"; import { useTranslations } from "next-intl"; -import Link from "next/link"; -import { SiDiscord } from "react-icons/si"; export default function HomeComponent() { const t = useTranslations("Home"); return ( <> -
-

- Next.js{" "} - - - i18n {" "} - - Starter -

-

- {t("description")} -

+
+ {/* 轮播图区域, 先用一张图片占位, 宽度100%, 盖度100vh */} + {t("carousel")} + {/* 公司介绍 - 左右布局 */} +
+ {/* 左边视频(图片占位) */} +
+ {t("company_video")} +
-
- - + {/* 右边内容 - 分三部分 */} +
+ {/* 第一部分:标题 */} +
+

天津友发钢管集团股份有限公司

+
+ + {/* 第二部分:介绍 */} +
+

+ 友发集团是集直缝焊接圆管(含热浸镀锌)、直缝焊接方矩管(含热浸镀锌)、钢塑复合管、不锈钢管及管件、螺旋焊管(含承插及防腐加工)、热镀锌无缝管、石油管道、管件、保温管道、塑料管及管件、盘扣脚手架、光伏支架及地桩等多种产品生产销售于一体的大型企业集团,拥有'友发'和'正金'两个品牌。已经形成天津、河北唐山、河北邯郸、河北沧州、陕西韩城、江苏溧阳、辽宁葫芦岛、云南玉溪、安徽临泉、吉林磐石10个生产基地,同时正在建设四川成都基地。 +

+
+ + {/* 第三部分:按钮 */} +
+ +
+
+ + + {/* 隐式轮播图,没有控件,每张四个卡片 */} +
+
+ {/* 第一组卡片 */} +
+
+
5
+
国家级绿色产品
+
+
+
3+
+
国家级绿色工厂
+
+
+
7
+
CNAS(国家认可)实验室
+
+
+
10
+
生产基地
+
+
+ {/* 第二组卡片 - 用于无缝轮播 */} +
+
+
5
+
国家级绿色产品
+
+
+
3+
+
国家级绿色工厂
+
+
+
7
+
CNAS(国家认可)实验室
+
+
+
10
+
生产基地
+
+
+
+
+ + + + + {/* 最新资讯 */} +
+ {/* 标题 */} +
+

+ 最新资讯 + +

+
+ + {/* 资讯卡片列表 */} +
+ {/* 第一张卡片 */} +
+
+
2025/11/17
+
核聚变区,智创未来,友发集团亮相202...
+
+
+ 资讯图片1 +
+
+ + {/* 第二张卡片 - 中间突出显示 */} +
+
+
2025/11/17
+
携手再攀产业新高峰,友发集团应邀出席...
+
+
+ 资讯图片2 +
+
+ + {/* 第三张卡片 */} +
+
+
2025/09/20
+
友发集团与中诚投建工集团签订战略合作...
+
+
+ 资讯图片3 +
+
+
+ + {/* 了解更多按钮 */} +
+ +
+
+ {/* 产品中心 */} +
+
+

+ 产品中心 + +

+
+ + {/* 左右布局,左3右2 */} +
+ {/* 左侧产品图 - 占3份 */} +
+ {/* 默认显示第一张产品图 */} + 直缝高频焊接圆管 + + {/* 产品标题覆盖层 */} +
+

直缝高频焊接圆管(含热浸镀锌)

+
+
+ + {/* 右侧产品列表 - 占2份,两列布局 */} +
+ {/* 产品1 */} +
{ + document.getElementById('productImage')?.setAttribute('src', '/placeholder.svg'); + document.getElementById('productImage')?.setAttribute('alt', '直缝高频焊接圆管'); + document.getElementById('productTitle')!.textContent = '直缝高频焊接圆管(含热浸镀锌)'; + }} + > + 直缝高频焊接圆管(含热浸镀锌) +
+ + {/* 产品2 */} +
{ + document.getElementById('productImage')?.setAttribute('src', '/placeholder.svg'); + document.getElementById('productImage')?.setAttribute('alt', '方形焊接钢管'); + document.getElementById('productTitle')!.textContent = '方形焊接钢管(含热浸镀锌)'; + }} + > + 方形焊接钢管(含热浸镀锌) +
+ + {/* 产品3 */} +
{ + document.getElementById('productImage')?.setAttribute('src', '/placeholder.svg'); + document.getElementById('productImage')?.setAttribute('alt', '钢塑复合管'); + document.getElementById('productTitle')!.textContent = '钢塑复合管'; + }} + > + 钢塑复合管 +
+ + {/* 产品4 */} +
{ + document.getElementById('productImage')?.setAttribute('src', '/placeholder.svg'); + document.getElementById('productImage')?.setAttribute('alt', '管路连接件'); + document.getElementById('productTitle')!.textContent = '管路连接件'; + }} + > + 管路连接件 +
+ + {/* 产品5 */} +
{ + document.getElementById('productImage')?.setAttribute('src', '/placeholder.svg'); + document.getElementById('productImage')?.setAttribute('alt', '盘扣脚手架'); + document.getElementById('productTitle')!.textContent = '盘扣脚手架'; + }} + > + 盘扣脚手架 +
+ + {/* 产品6 */} +
{ + document.getElementById('productImage')?.setAttribute('src', '/placeholder.svg'); + document.getElementById('productImage')?.setAttribute('alt', '不锈钢管及管件'); + document.getElementById('productTitle')!.textContent = '不锈钢管及管件'; + }} + > + 不锈钢管及管件 +
+
+
+
+ + {/* 应用领域 */} +
+ {/* 标题 */} +
+

+ 应用领域 + +

+
+ + {/* 轮播容器 */} +
+ {/* 左切换按钮 */} + + + {/* 右切换按钮 */} + + + {/* 轮播内容 */} +
+
+ {/* 第一组卡片拼图 */} +
+ {/* 第一行 */} +
+ {/* 电梯井道 */} +
+ 电梯井道 +
+ 电梯井道 +
+
+ + {/* 塔机制造 - 宽度为其他卡片的两倍 */} +
+ 塔机制造 +
+ 塔机制造 +
+
+ + {/* 工程机械 */} +
+ 工程机械 +
+ 工程机械 +
+
+
+ + {/* 第二行 */} +
+ {/* 高速护栏 - 宽度为其他卡片的两倍 */} +
+ 高速护栏 +
+ 高速护栏 +
+
+ + {/* 桥梁 */} +
+ 桥梁 +
+ 桥梁 +
+
+ + {/* 钢结构 */} +
+ 钢结构 +
+ 钢结构 +
+
+
+
+ + {/* 第二组卡片拼图(可扩展更多组) */} +
+ {/* 第一行 */} +
+ {/* 建筑工程 */} +
+ 建筑工程 +
+ 建筑工程 +
+
+ + {/* 水利水电 */} +
+ 水利水电 +
+ 水利水电 +
+
+ + {/* 轨道交通 */} +
+ 轨道交通 +
+ 轨道交通 +
+
+
+ + {/* 第二行 */} +
+ {/* 市政工程 */} +
+ 市政工程 +
+ 市政工程 +
+
+ + {/* 农业设施 */} +
+ 农业设施 +
+ 农业设施 +
+
+ + {/* 能源化工 */} +
+ 能源化工 +
+ 能源化工 +
+
+
+
+
+
+
+
+ + {/* 生产案例 */}
); diff --git a/i18n/messages/en.json b/i18n/messages/en.json index 603bc91..af68f9a 100644 --- a/i18n/messages/en.json +++ b/i18n/messages/en.json @@ -8,24 +8,12 @@ "Header": { "links": [ { - "name": "Blog", + "name": "News Center", "href": "/blog" }, { "name": "About", "href": "/about" - }, - { - "name": "Source Code", - "href": "https://github.com/weijunext/nextjs-starter", - "target": "_blank", - "rel": "noopener noreferrer nofollow" - }, - { - "name": "Pro Version", - "href": "https://nexty.dev", - "target": "_blank", - "rel": "noopener noreferrer" } ] }, @@ -35,26 +23,6 @@ "TermsOfService": "Terms of Service", "Links": { "groups": [ - { - "title": "Languages", - "links": [ - { - "href": "/en", - "name": "English", - "useA": true - }, - { - "href": "/zh", - "name": "中文", - "useA": true - }, - { - "href": "/ja", - "name": "日本語", - "useA": true - } - ] - }, { "title": "Open Source", "links": [ diff --git a/i18n/messages/ja.json b/i18n/messages/ja.json index 819f49c..518f43f 100644 --- a/i18n/messages/ja.json +++ b/i18n/messages/ja.json @@ -8,7 +8,7 @@ "Header": { "links": [ { - "name": "ブログ", + "name": "ニュースセンター", "href": "/blog" }, { diff --git a/i18n/messages/vi.json b/i18n/messages/vi.json index b5afc83..06b25e8 100644 --- a/i18n/messages/vi.json +++ b/i18n/messages/vi.json @@ -8,24 +8,12 @@ "Header": { "links": [ { - "name": "Blog", + "name": "Tin tức", "href": "/blog" }, { "name": "Về chúng tôi", "href": "/about" - }, - { - "name": "Mã nguồn", - "href": "https://github.com/weijunext/nextjs-starter", - "target": "_blank", - "rel": "noopener noreferrer nofollow" - }, - { - "name": "Phiên bản cao cấp", - "href": "https://nexty.dev", - "target": "_blank", - "rel": "noopener noreferrer" } ] }, @@ -35,31 +23,6 @@ "TermsOfService": "Điều khoản dịch vụ", "Links": { "groups": [ - { - "title": "Ngôn ngữ", - "links": [ - { - "href": "/en", - "name": "English", - "useA": true - }, - { - "href": "/zh", - "name": "Tiếng Trung", - "useA": true - }, - { - "href": "/ja", - "name": "Tiếng Nhật", - "useA": true - }, - { - "href": "/vi", - "name": "Tiếng Việt", - "useA": true - } - ] - }, { "title": "Dự án mã nguồn mở", "links": [ diff --git a/i18n/messages/zh.json b/i18n/messages/zh.json index fe31c66..e3d2459 100644 --- a/i18n/messages/zh.json +++ b/i18n/messages/zh.json @@ -8,24 +8,16 @@ "Header": { "links": [ { - "name": "博客", - "href": "/blog" + "name": "网站首页", + "href": "/" }, { - "name": "关于", + "name": "走进福安德", "href": "/about" }, { - "name": "源码", - "href": "https://github.com/weijunext/nextjs-starter", - "target": "_blank", - "rel": "noopener noreferrer nofollow" - }, - { - "name": "高级版", - "href": "https://nexty.dev", - "target": "_blank", - "rel": "noopener noreferrer" + "name": "新闻中心", + "href": "/blog" } ] }, @@ -36,21 +28,41 @@ "Links": { "groups": [ { - "title": "语言", + "title": "关于我们", "links": [ { - "href": "/en", - "name": "English", + "href": "/about?section=company", + "name": "公司简介", "useA": true }, { - "href": "/zh", - "name": "中文", + "href": "/about?section=culture", + "name": "企业文化", "useA": true }, { - "href": "/ja", - "name": "日本語", + "href": "/about?section=base", + "name": "生产基地", + "useA": true + }, + { + "href": "/about?section=organization", + "name": "组织架构", + "useA": true + }, + { + "href": "/about?section=awards", + "name": "荣誉资质", + "useA": true + }, + { + "href": "/about?section=history", + "name": "发展历程", + "useA": true + }, + { + "href": "/about?section=green", + "name": "绿色发展", "useA": true } ] diff --git a/i18n/request.ts b/i18n/request.ts index 03955aa..4b8944b 100644 --- a/i18n/request.ts +++ b/i18n/request.ts @@ -7,8 +7,6 @@ export default getRequestConfig(async ({ requestLocale }) => { if (locale?.startsWith('zh')) { locale = 'zh'; - } else if (locale?.startsWith('ja')) { - locale = 'ja'; } else if (locale?.startsWith('en')) { locale = 'en'; } else if (locale?.startsWith('vi')) { diff --git a/i18n/routing.ts b/i18n/routing.ts index 4356a55..e17648f 100644 --- a/i18n/routing.ts +++ b/i18n/routing.ts @@ -1,12 +1,11 @@ import { createNavigation } from 'next-intl/navigation'; import { defineRouting } from 'next-intl/routing'; -export const LOCALES = ['en', 'zh', 'ja', 'vi'] +export const LOCALES = ['en', 'zh', 'vi'] export const DEFAULT_LOCALE = 'zh' export const LOCALE_NAMES: Record = { 'en': "English", 'zh': "中文", - 'ja': "日本語", 'vi': "Tiếng Việt", };