فهرست منبع

feat: 首页底部点击联系我们跳转到相应页面

zhaoxinming 9 ساعت پیش
والد
کامیت
0a227183e5

+ 2 - 2
public/manifest.json

@@ -1,6 +1,6 @@
 {
-  "short_name": "FreeGo",
-  "name": "FreeGo",
+  "short_name": "Freego",
+  "name": "Freego",
   "icons": [
     {
       "src": "favicon.ico",

+ 3 - 3
src/App.js

@@ -3,9 +3,9 @@ import './App.css';
 import Footer from "./component/Footer/Footer";
 import Header from "./component/Header/Header";
 import Home from "./pages/Home/Home";
-import FreeGo from "./pages/FreeGo/FreeGo";
+import ContactUs from "./pages/ContactUs/ContactUs";
 import AboutUs from "./pages/AboutUs/AboutUs";
-import {ABOUT_US, FREE_GO, HOME} from "./uitls/Constants";
+import {ABOUT_US, CONTACT_US, HOME} from "./uitls/Constants";
 import './i18n';
 import React from "react";
 import ScrollToTopButton from "./component/ScrollToTopButton/ScrollToTopButton";
@@ -18,7 +18,7 @@ const App = () => {
                 <Header/>
                 <Routes>
                     <Route path={HOME} element={<Home/>}/>
-                    <Route path={FREE_GO} element={<FreeGo/>}/>
+                    <Route path={CONTACT_US} element={<ContactUs/>}/>
                     <Route path={ABOUT_US} element={<AboutUs/>}/>
                 </Routes>
                 <Footer/>

+ 0 - 0
src/assets/images/join/top.png → src/assets/images/aboutus/top.png


BIN
src/assets/images/join/bottom.png


BIN
src/assets/images/join/jobs_bg.png


BIN
src/assets/images/join/left.png


BIN
src/assets/images/join/right.png


+ 23 - 2
src/component/Footer/Footer.js

@@ -1,12 +1,32 @@
-import React from 'react';
+import React, {useEffect, useState} from 'react';
 import Styles from './Footer.module.css';
 import {useTranslation} from "react-i18next";
+import eventBus from "../../uitls/EventBus";
+import {CONTACT_US, HOME} from "../../uitls/Constants";
+import {useNavigate} from "react-router-dom";
 
 // 底部信息栏组件
 const Footer = () => {
     const {t} = useTranslation();
+    const [isHome, setHome] = useState(true)
+    const navigate = useNavigate();
+
+    useEffect(() => {
+        eventBus.on('changeTabEvent', (tab) => {
+            setHome(tab === HOME)
+            console.log("tab", tab)
+        });
+
+        // 清除监听,防止内存泄漏
+        return () => {
+            eventBus.off('changeTabEvent');
+        };
+    }, []);
+
     const onClick = () => {
-       console.log('点击了:Let\'s Connect');
+        console.log('点击了:Let\'s Connect');
+        eventBus.emit('changeTabEvent', CONTACT_US)
+        navigate(CONTACT_US)
     };
 
     return (
@@ -15,6 +35,7 @@ const Footer = () => {
             <p className={Styles.content}>{t('footerHelp')}</p>
             <p className={Styles.content}>{t('footerEmail')}</p>
             <button
+                style={{display: isHome ? 'flex' : 'none'}}
                 className={Styles.ellipseBtn}
                 onClick={onClick}
             >

+ 4 - 4
src/component/Navigation/Navigation.js

@@ -1,7 +1,7 @@
 import React from 'react';
 import {NavLink} from 'react-router-dom';
 import './Navigation.module.css';
-import {ABOUT_US, FREE_GO, HOME} from "../../uitls/Constants";
+import {ABOUT_US, CONTACT_US, HOME} from "../../uitls/Constants";
 import Styles from './Navigation.module.css';
 import {useTranslation} from "react-i18next";
 import eventBus from "../../uitls/EventBus";
@@ -22,12 +22,12 @@ const Navigation = () => {
                          }}
                          className={({isActive}) => isActive ? Styles.active : ''}
                 >{t('home')}</NavLink>
-                <NavLink to={FREE_GO}
+                <NavLink to={CONTACT_US}
                          onClick={() => {
-                             changeTab(FREE_GO)
+                             changeTab(CONTACT_US)
                          }}
                          className={({isActive}) => isActive ? Styles.active : ''}
-                >{t('freeGo')}</NavLink>
+                >{t('contactUs')}</NavLink>
                 <NavLink to={ABOUT_US} onClick={() => {
                     changeTab(ABOUT_US)
                 }}

+ 6 - 7
src/i18n/locales/en.json

@@ -1,9 +1,8 @@
 {
   "test": "Multilingual Testing",
   "home": "Home",
-  "freeGo": "FreeGo",
   "aboutUs": "About Us",
-  "contactUs": "Contact Us",
+  "contactUs": "Contact",
   "address": "Address: Building D, Tower 13, Jingxi AI Valley, Beijing",
   "email": "Email: info@zhengqiai.com",
   "videoNotSupport": "Your browser does not support HTML5 video.",
@@ -29,7 +28,7 @@
   "homeTipContent8": "Family can see the chair's location anytime on their phone to ensure safety.",
   "homeTipContent9": "A high-tech and stylish appearance, wrap-around super armrests, and a streamlined body design",
   "homeTipContent10": "With auto-follow and stylish design, the chair makes travel more free and enjoyable, bringing fun and companionship",
-  "footerTitle": "Contact FreeGo",
+  "footerTitle": "Contact Freego",
   "footerEmail": " Email: info@freegoai.com",
   "footerHelp": "We're here to help. Whether you're a customer, a dealer, or a media partner - feel free to reach out.",
   "footerBtn": "Let's Connect",
@@ -44,7 +43,7 @@
   "recruit": "「FreeGo X5」 Global Experience Program",
   "scanCode": "Scan to Apply Now",
   "bottomLeftText1": "Be Among the First to Experience and Influence AI Mobility!",
-  "bottomLeftText2": "Apply Now to Embark on Your Journey as a FreeGo X5 Global Experience Explorer!",
+  "bottomLeftText2": "Apply Now to Embark on Your Journey as a Freego X5 Global Experience Explorer!",
   "partnerLeftText1": "Why Choose Us",
   "partnerLeftText2": "Cutting-edge Technology, Industry Leadership",
   "partnerLeftText3": "High Sales Commission + Regional Exclusive Rights",
@@ -61,16 +60,16 @@
   "topRightText1": "No Retreat, Only Victory",
   "topRightText2": "Long-term Partnership with Tiered Profit Mechanism",
   "newsTitle": "2025 China International Medical Equipment Fair",
-  "newsSubtitle": "FreeGo Debuts First Mass-produced AI Mobility Robot at CMEF",
+  "newsSubtitle": "Freego Debuts First Mass-produced AI Mobility Robot at CMEF",
   "newsContentTitle": "Premiere of First Mass-produced AI Mobility Robot at CMEF",
   "newsContent1": "Visionaries who embrace smart mobility concepts",
   "newsContent2": "Entrepreneurial experience in tech/retail sectors preferred",
   "newsContent3": "Long-term collaborators for urban smart mobility ecosystem",
   "newsDetailTitle": "Groundbreaking Debut of AI Mobility Robot at CMEF",
-  "newsDetailContent": "FreeGo's First Mass-produced AI Mobility Robot Makes Sensational CMEF Premiere",
+  "newsDetailContent": "Freego's First Mass-produced AI Mobility Robot Makes Sensational CMEF Premiere",
   "newsDetailAuthor": "News Editor",
   "joinUsTitle": "Company Overview",
-  "joinUsContent1": "FreeGo is dedicated to developing embodied intelligent robots within a 3KM living ecosystem. We provide comprehensive solutions spanning mobility, companion care, and last-mile logistics, all aimed at delivering smarter, more convenient, and comfortable experiences for users worldwide.",
+  "joinUsContent1": "Freego is dedicated to developing embodied intelligent robots within a 3KM living ecosystem. We provide comprehensive solutions spanning mobility, companion care, and last-mile logistics, all aimed at delivering smarter, more convenient, and comfortable experiences for users worldwide.",
   "joinUsContent2": "Explore AI Future, Co-create Brilliant Living.",
   "joinUsLeftContent1": "Our Mission",
   "joinUsLeftContent2": "Transforming the Way We Move with AI",

+ 1 - 1
src/i18n/locales/zh.json

@@ -1,7 +1,7 @@
 {
   "test": "测试多语言",
   "home": "首页",
-  "freeGo": "FreeGo",
+  "freeGo": "Freego",
   "partner": "城市合伙人",
   "news": "新闻资讯",
   "aboutUs": "关于我们",

+ 1 - 1
src/pages/AboutUs/AboutUs.module.css

@@ -10,7 +10,7 @@
     justify-content: center;
     height: 500px;
     width: 100%;
-    background-image: url("../../assets/images/join/top.png");
+    background-image: url("../../assets/images/aboutus/top.png");
     background-size: cover;
     background-position: center;
     background-Repeat: no-repeat;

+ 11 - 0
src/pages/ContactUs/ContactUs.js

@@ -0,0 +1,11 @@
+import React from 'react';
+import styles from "./ContactUs.module.css";
+// 首页内容组件
+const ContactUs = () => {
+    return (
+        <main className={styles.root}>
+        </main>
+    );
+};
+
+export default ContactUs;

+ 0 - 0
src/pages/FreeGo/FreeGo.module.css → src/pages/ContactUs/ContactUs.module.css


+ 0 - 13
src/pages/FreeGo/FreeGo.js

@@ -1,13 +0,0 @@
-import React from 'react';
-import styles from './FreeGo.module.css';
-import BannerSwiper from '../../component/Swiper/BannerSwiper';
-// 首页内容组件
-const FreeGo = () => {
-    return (
-        <main className={styles.root}>
-            <BannerSwiper/>
-        </main>
-    );
-};
-
-export default FreeGo;

+ 1 - 2
src/uitls/Constants.js

@@ -1,4 +1,3 @@
 export const HOME = "/"
-export const FREE_GO = "/freeGo"
-export const NEWS = "/news"
+export const CONTACT_US = "/contactUs"
 export const ABOUT_US = "/aboutUs"