From 7b1139f868f63bbf04aac3cf30da4916885a3227 Mon Sep 17 00:00:00 2001 From: zhangjianjun Date: Mon, 23 Mar 2026 11:15:15 +0800 Subject: [PATCH] save --- package.json | 3 +- src/Routes.tsx | 10 +++++- .../layout/SectionTitle/index.module.css | 10 ++++++ src/components/layout/SectionTitle/index.tsx | 4 ++- src/layouts/MainLayout.tsx | 4 ++- src/pages/Business/CommercialGroup.module.css | 32 ++++++++++++++++--- src/pages/Business/CommercialGroup.tsx | 7 ++-- src/utils/NavigateReplace.tsx | 11 +++++++ 8 files changed, 71 insertions(+), 10 deletions(-) create mode 100644 src/utils/NavigateReplace.tsx diff --git a/package.json b/package.json index 53d2127..3635f4c 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,8 @@ "webpack-manifest-plugin": "^4.0.2", "winston": "^3.17.0", "workbox-webpack-plugin": "^6.4.1", - "zustand": "^5.0.11" + "zustand": "^5.0.11", + "react-activation": "^0.13.4" }, "scripts": { "dev": "node --stack-size=12800 --stack-trace-limit=20 scripts/start.js", diff --git a/src/Routes.tsx b/src/Routes.tsx index 6e6d035..a4d7a68 100644 --- a/src/Routes.tsx +++ b/src/Routes.tsx @@ -1,6 +1,6 @@ import Home from "@/pages/Home/index"; import MainLayout from "@/layouts/MainLayout"; -import type { RouteObject } from "react-router-dom"; +import { Navigate, type RouteObject } from "react-router-dom"; import About from "@/pages/About/overview"; import AboutHistory from "@/pages/About/History"; @@ -25,6 +25,8 @@ import PrivacyPolicy from "@/pages/Others/PrivacyPolicy"; import AuditReport from "@/pages/Others/AuditReport"; import SiteMap from "@/pages/Others/SiteMap"; import Search from "@/pages/Others/Search"; +import NavigateReplace from "@/utils/NavigateReplace"; + const routes: RouteObject[] = [ { @@ -33,10 +35,12 @@ const routes: RouteObject[] = [ children: [ { index: true, element: }, // 关于银泰 + { path: "about", element: }, { path: "about/overview", element: }, //集团概览 { path: "about/history", element: }, { path: "about/founder", element: }, // 集团业务 + { path: "business", element: }, { path: "business/commercial-group", element: }, { path: "business/commercial-group/:detailType", element: }, { path: "business/base-group", element: }, @@ -44,13 +48,16 @@ const routes: RouteObject[] = [ { path: "business/invest-group", element: }, { path: "business/ruijing-group", element: }, // 社会责任 + { path: "social", element: }, { path: "social/sustainability", element: }, { path: "social/foundation", element: }, // 新闻中心 + { path: "news", element: }, { path: "news/public", element: }, { path: "news/media", element: }, { path: "news/detail/:id", element: }, // 加入银泰 + { path: "join", element: }, { path: "join/culture", element: }, { path: "join/campus", element: }, { path: "join/campus/detail/:id", element: }, @@ -64,6 +71,7 @@ const routes: RouteObject[] = [ { path: "/privacy-policy", element: }, { path: "/audit-report", element: }, { path: "/site-map", element: }, + { path: "/contact-us", element: }, ], }, { diff --git a/src/components/layout/SectionTitle/index.module.css b/src/components/layout/SectionTitle/index.module.css index 7097c54..89bdf79 100644 --- a/src/components/layout/SectionTitle/index.module.css +++ b/src/components/layout/SectionTitle/index.module.css @@ -18,4 +18,14 @@ margin-top: 20px; } + .sectionTitleSubcontent { + font-weight: 500; + font-size: 18px; + line-height: 30px; + text-align: center; + font-style: normal; + text-transform: none; + margin-top: 20px; + } + } \ No newline at end of file diff --git a/src/components/layout/SectionTitle/index.tsx b/src/components/layout/SectionTitle/index.tsx index 5dcac20..11b21e8 100644 --- a/src/components/layout/SectionTitle/index.tsx +++ b/src/components/layout/SectionTitle/index.tsx @@ -3,14 +3,16 @@ import styles from "./index.module.css"; type Props = { title: string; subtitle?: string; + subcontent?: string; color?: string; } -export default function SectionTitle({ title, subtitle, color }: Props) { +export default function SectionTitle({ title, subtitle, color, subcontent }: Props) { return (
{title} {subtitle && {subtitle}} + {subcontent && {subcontent}}
) } \ No newline at end of file diff --git a/src/layouts/MainLayout.tsx b/src/layouts/MainLayout.tsx index 4d6aec9..59e4757 100644 --- a/src/layouts/MainLayout.tsx +++ b/src/layouts/MainLayout.tsx @@ -3,6 +3,8 @@ import { useEffect } from "react"; import Header from "./Header"; import Footer from "./Footer"; import useHashScroll from "@/hooks/useHashScroll"; +import { AliveScope } from "react-activation"; + export default function MainLayout() { useHashScroll() const { pathname } = useLocation(); @@ -15,7 +17,7 @@ export default function MainLayout() {
- +
diff --git a/src/pages/Business/CommercialGroup.module.css b/src/pages/Business/CommercialGroup.module.css index af69977..34f9121 100644 --- a/src/pages/Business/CommercialGroup.module.css +++ b/src/pages/Business/CommercialGroup.module.css @@ -37,6 +37,7 @@ background-repeat: no-repeat; padding: 100px 0 !important; } + .twoColSection.reverse { flex-direction: row-reverse; } @@ -55,10 +56,12 @@ color: #222; line-height: 34px; } + .twoColSectionTab.active { border-bottom: 2px solid #14355C; color: #14355C; } + .twoColSectionContent { display: grid; grid-template-columns: 1fr 1fr; @@ -105,7 +108,7 @@ margin: 0 0 1rem; } -.twoColDesc + .twoColDesc { +.twoColDesc+.twoColDesc { margin-top: 0; } @@ -139,9 +142,28 @@ } .featuresHeroContent { - height: 690px; + margin-top: 160px; + height: 400px; + overflow: hidden; width: 100%; color: #FFFFFF; + white-space: pre-wrap; +} + +.featuresHeroContentTitle { + font-family: Source Han Sans, Source Han Sans; + font-weight: 600; + font-size: 30px; + color: #FFFFFF; + margin-bottom: 30px; +} + +.featuresHeroContentDesc { + font-family: Source Han Sans, Source Han Sans; + font-weight: 400; + font-size: 18px; + color: #FFFFFF; + line-height: 40px; } .featuresHeroTabs { @@ -149,7 +171,7 @@ flex-direction: row; justify-content: center; gap: 200px; - border-top: 1px solid rgba(255,255,255,0.5); + border-top: 1px solid rgba(255, 255, 255, 0.5); } .featuresHeroTab { @@ -160,6 +182,7 @@ height: 60px; cursor: pointer; } + .featuresHeroTab.active { border-top: 2px solid #FFFFFF; } @@ -186,6 +209,7 @@ color: #FFFFFF; line-height: 50px; } + .propertyServicesSubtitle { font-weight: 500; font-size: 18px; @@ -297,4 +321,4 @@ .featureBlockTitle { font-size: 1.875rem; } -} +} \ No newline at end of file diff --git a/src/pages/Business/CommercialGroup.tsx b/src/pages/Business/CommercialGroup.tsx index 278d5b9..f7d2b72 100644 --- a/src/pages/Business/CommercialGroup.tsx +++ b/src/pages/Business/CommercialGroup.tsx @@ -6,6 +6,7 @@ import Banner from "@/components/Banner"; import ParagraphSection from "@/components/layout/ParagraphSection"; import Section from "@/components/layout/Section"; import TopTabs from "@/components/layout/TopTabsSection/TopTabs"; +import SectionTitle from "@/components/layout/SectionTitle"; const FALLBACK_GRADIENT = "linear-gradient(135deg, #1a2a4a 0%, #2d4a7c 100%)"; @@ -72,11 +73,13 @@ export default function BusinessCommercialGroup() {
+
-
{section3Data.tabItems[activeFeaturesTabIndex]?.content}
+
{section3Data.tabItems[activeFeaturesTabIndex]?.tabName}
+
{section3Data.tabItems[activeFeaturesTabIndex]?.content}
{section3Data.tabItems.map((item: { tabName: string }, i: number) => ( diff --git a/src/utils/NavigateReplace.tsx b/src/utils/NavigateReplace.tsx new file mode 100644 index 0000000..c491808 --- /dev/null +++ b/src/utils/NavigateReplace.tsx @@ -0,0 +1,11 @@ +import { useLayoutEffect } from "react"; +import { useNavigate } from "react-router-dom"; +function NavigateReplace({ path, children }: { path: string, children: any }) { + const navigate = useNavigate(); + useLayoutEffect(() => { + navigate(path, { replace: true }); + }, [path, navigate]); + return children; +} + +export default NavigateReplace; \ No newline at end of file