This commit is contained in:
zhangjianjun 2026-03-23 11:15:15 +08:00
parent bc67d4a21d
commit 7b1139f868
8 changed files with 71 additions and 10 deletions

View File

@ -79,7 +79,8 @@
"webpack-manifest-plugin": "^4.0.2", "webpack-manifest-plugin": "^4.0.2",
"winston": "^3.17.0", "winston": "^3.17.0",
"workbox-webpack-plugin": "^6.4.1", "workbox-webpack-plugin": "^6.4.1",
"zustand": "^5.0.11" "zustand": "^5.0.11",
"react-activation": "^0.13.4"
}, },
"scripts": { "scripts": {
"dev": "node --stack-size=12800 --stack-trace-limit=20 scripts/start.js", "dev": "node --stack-size=12800 --stack-trace-limit=20 scripts/start.js",

View File

@ -1,6 +1,6 @@
import Home from "@/pages/Home/index"; import Home from "@/pages/Home/index";
import MainLayout from "@/layouts/MainLayout"; 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 About from "@/pages/About/overview";
import AboutHistory from "@/pages/About/History"; import AboutHistory from "@/pages/About/History";
@ -25,6 +25,8 @@ import PrivacyPolicy from "@/pages/Others/PrivacyPolicy";
import AuditReport from "@/pages/Others/AuditReport"; import AuditReport from "@/pages/Others/AuditReport";
import SiteMap from "@/pages/Others/SiteMap"; import SiteMap from "@/pages/Others/SiteMap";
import Search from "@/pages/Others/Search"; import Search from "@/pages/Others/Search";
import NavigateReplace from "@/utils/NavigateReplace";
const routes: RouteObject[] = [ const routes: RouteObject[] = [
{ {
@ -33,10 +35,12 @@ const routes: RouteObject[] = [
children: [ children: [
{ index: true, element: <Home /> }, { index: true, element: <Home /> },
// 关于银泰 // 关于银泰
{ path: "about", element: <NavigateReplace path="/about/overview"><About /></NavigateReplace> },
{ path: "about/overview", element: <About /> }, //集团概览 { path: "about/overview", element: <About /> }, //集团概览
{ path: "about/history", element: <AboutHistory /> }, { path: "about/history", element: <AboutHistory /> },
{ path: "about/founder", element: <AboutFounder /> }, { path: "about/founder", element: <AboutFounder /> },
// 集团业务 // 集团业务
{ path: "business", element: <NavigateReplace path="/business/commercial-group"><BusinessCommercialGroup /></NavigateReplace> },
{ path: "business/commercial-group", element: <BusinessCommercialGroup /> }, { path: "business/commercial-group", element: <BusinessCommercialGroup /> },
{ path: "business/commercial-group/:detailType", element: <BusinessCommercialGroupDetail /> }, { path: "business/commercial-group/:detailType", element: <BusinessCommercialGroupDetail /> },
{ path: "business/base-group", element: <BusinessBaseGroup /> }, { path: "business/base-group", element: <BusinessBaseGroup /> },
@ -44,13 +48,16 @@ const routes: RouteObject[] = [
{ path: "business/invest-group", element: <BusinessInvestGroup /> }, { path: "business/invest-group", element: <BusinessInvestGroup /> },
{ path: "business/ruijing-group", element: <BusinessRujingGroup /> }, { path: "business/ruijing-group", element: <BusinessRujingGroup /> },
// 社会责任 // 社会责任
{ path: "social", element: <NavigateReplace path="/social/sustainability"><SocialSustainability /></NavigateReplace> },
{ path: "social/sustainability", element: <SocialSustainability /> }, { path: "social/sustainability", element: <SocialSustainability /> },
{ path: "social/foundation", element: <SocialFoundation /> }, { path: "social/foundation", element: <SocialFoundation /> },
// 新闻中心 // 新闻中心
{ path: "news", element: <NavigateReplace path="/news/public"><NewsPublic /></NavigateReplace> },
{ path: "news/public", element: <NewsPublic /> }, { path: "news/public", element: <NewsPublic /> },
{ path: "news/media", element: <NewsMedia /> }, { path: "news/media", element: <NewsMedia /> },
{ path: "news/detail/:id", element: <NewsDetail /> }, { path: "news/detail/:id", element: <NewsDetail /> },
// 加入银泰 // 加入银泰
{ path: "join", element: <NavigateReplace path="/join/culture"><JoinCulture /></NavigateReplace> },
{ path: "join/culture", element: <JoinCulture /> }, { path: "join/culture", element: <JoinCulture /> },
{ path: "join/campus", element: <JoinCampus /> }, { path: "join/campus", element: <JoinCampus /> },
{ path: "join/campus/detail/:id", element: <JoinCampusDetail /> }, { path: "join/campus/detail/:id", element: <JoinCampusDetail /> },
@ -64,6 +71,7 @@ const routes: RouteObject[] = [
{ path: "/privacy-policy", element: <PrivacyPolicy /> }, { path: "/privacy-policy", element: <PrivacyPolicy /> },
{ path: "/audit-report", element: <AuditReport /> }, { path: "/audit-report", element: <AuditReport /> },
{ path: "/site-map", element: <SiteMap /> }, { path: "/site-map", element: <SiteMap /> },
{ path: "/contact-us", element: <Navigate to="/news/media"></Navigate> },
], ],
}, },
{ {

View File

@ -18,4 +18,14 @@
margin-top: 20px; 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;
}
} }

View File

@ -3,14 +3,16 @@ import styles from "./index.module.css";
type Props = { type Props = {
title: string; title: string;
subtitle?: string; subtitle?: string;
subcontent?: string;
color?: string; color?: string;
} }
export default function SectionTitle({ title, subtitle, color }: Props) { export default function SectionTitle({ title, subtitle, color, subcontent }: Props) {
return ( return (
<div className={styles.sectionTitle} style={{ color: color || '#222', marginBottom: subtitle ? '60px' : '100px' }}> <div className={styles.sectionTitle} style={{ color: color || '#222', marginBottom: subtitle ? '60px' : '100px' }}>
<span>{title}</span> <span>{title}</span>
{subtitle && <span className={styles.sectionTitleSubtitle}>{subtitle}</span>} {subtitle && <span className={styles.sectionTitleSubtitle}>{subtitle}</span>}
{subcontent && <span className={styles.sectionTitleSubcontent}>{subcontent}</span>}
</div> </div>
) )
} }

View File

@ -3,6 +3,8 @@ import { useEffect } from "react";
import Header from "./Header"; import Header from "./Header";
import Footer from "./Footer"; import Footer from "./Footer";
import useHashScroll from "@/hooks/useHashScroll"; import useHashScroll from "@/hooks/useHashScroll";
import { AliveScope } from "react-activation";
export default function MainLayout() { export default function MainLayout() {
useHashScroll() useHashScroll()
const { pathname } = useLocation(); const { pathname } = useLocation();
@ -15,7 +17,7 @@ export default function MainLayout() {
<div className="layout"> <div className="layout">
<Header /> <Header />
<main className="container"> <main className="container">
<Outlet /> <Outlet />
</main> </main>
<Footer /> <Footer />
</div> </div>

View File

@ -37,6 +37,7 @@
background-repeat: no-repeat; background-repeat: no-repeat;
padding: 100px 0 !important; padding: 100px 0 !important;
} }
.twoColSection.reverse { .twoColSection.reverse {
flex-direction: row-reverse; flex-direction: row-reverse;
} }
@ -55,10 +56,12 @@
color: #222; color: #222;
line-height: 34px; line-height: 34px;
} }
.twoColSectionTab.active { .twoColSectionTab.active {
border-bottom: 2px solid #14355C; border-bottom: 2px solid #14355C;
color: #14355C; color: #14355C;
} }
.twoColSectionContent { .twoColSectionContent {
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
@ -105,7 +108,7 @@
margin: 0 0 1rem; margin: 0 0 1rem;
} }
.twoColDesc + .twoColDesc { .twoColDesc+.twoColDesc {
margin-top: 0; margin-top: 0;
} }
@ -139,9 +142,28 @@
} }
.featuresHeroContent { .featuresHeroContent {
height: 690px; margin-top: 160px;
height: 400px;
overflow: hidden;
width: 100%; width: 100%;
color: #FFFFFF; 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 { .featuresHeroTabs {
@ -149,7 +171,7 @@
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
gap: 200px; gap: 200px;
border-top: 1px solid rgba(255,255,255,0.5); border-top: 1px solid rgba(255, 255, 255, 0.5);
} }
.featuresHeroTab { .featuresHeroTab {
@ -160,6 +182,7 @@
height: 60px; height: 60px;
cursor: pointer; cursor: pointer;
} }
.featuresHeroTab.active { .featuresHeroTab.active {
border-top: 2px solid #FFFFFF; border-top: 2px solid #FFFFFF;
} }
@ -186,6 +209,7 @@
color: #FFFFFF; color: #FFFFFF;
line-height: 50px; line-height: 50px;
} }
.propertyServicesSubtitle { .propertyServicesSubtitle {
font-weight: 500; font-weight: 500;
font-size: 18px; font-size: 18px;

View File

@ -6,6 +6,7 @@ import Banner from "@/components/Banner";
import ParagraphSection from "@/components/layout/ParagraphSection"; import ParagraphSection from "@/components/layout/ParagraphSection";
import Section from "@/components/layout/Section"; import Section from "@/components/layout/Section";
import TopTabs from "@/components/layout/TopTabsSection/TopTabs"; import TopTabs from "@/components/layout/TopTabsSection/TopTabs";
import SectionTitle from "@/components/layout/SectionTitle";
const FALLBACK_GRADIENT = "linear-gradient(135deg, #1a2a4a 0%, #2d4a7c 100%)"; const FALLBACK_GRADIENT = "linear-gradient(135deg, #1a2a4a 0%, #2d4a7c 100%)";
@ -72,11 +73,13 @@ export default function BusinessCommercialGroup() {
<section <section
className={styles.featuresHero} className={styles.featuresHero}
style={{ style={{
backgroundImage: `url(/images/bg-overview.png), ${FALLBACK_GRADIENT}`, backgroundImage: `url(${section3Data.tabItems[activeFeaturesTabIndex]?.backgroundImage}), ${FALLBACK_GRADIENT}`,
}} }}
> >
<SectionTitle color="#fff" title={section3Data.title} subcontent={section3Data.content} />
<div className={styles.featuresHeroContent}> <div className={styles.featuresHeroContent}>
<div>{section3Data.tabItems[activeFeaturesTabIndex]?.content}</div> <div className={styles.featuresHeroContentTitle}>{section3Data.tabItems[activeFeaturesTabIndex]?.tabName}</div>
<div className={styles.featuresHeroContentDesc}>{section3Data.tabItems[activeFeaturesTabIndex]?.content}</div>
</div> </div>
<div className={styles.featuresHeroTabs}> <div className={styles.featuresHeroTabs}>
{section3Data.tabItems.map((item: { tabName: string }, i: number) => ( {section3Data.tabItems.map((item: { tabName: string }, i: number) => (

View File

@ -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;