Explorar o código

跟新页面以及静态资源

丁烨烨 hai 6 meses
pai
achega
ba8b6fcda3

+ 5 - 4
.env.development

@@ -1,4 +1,5 @@
-NEXT_PUBLIC_API_BASE=http://localhost:8040
-NEXT_PUBLIC_BASE_URL=http://localhost:8040
-NEXT_PUBLIC_REMOTE_BASE_URL=http://localhost:8040
-NEXT_PUBLIC_BASE_WS_URL = 'ws://localhost:8081/ws'
+NEXT_PUBLIC_API_BASE=http://192.168.110.235:8040
+NEXT_PUBLIC_BASE_URL=http://192.168.110.235:8040
+NEXT_PUBLIC_REMOTE_BASE_URL=http://192.168.110.235:8040
+//NEXT_PUBLIC_BASE_WS_URL = 'ws://192.168.110.235:8081/ws'
+NEXT_PUBLIC_BASE_WS_URL = 'ws://192.168.110.235:8040/ws'

+ 6 - 0
next.config.ts

@@ -10,6 +10,12 @@ const nextConfig: NextConfig = {
         port: '8040',
         pathname: '/**',
       },
+      {
+        protocol: 'http',
+        hostname: '192.168.110.235',
+        port: '8040',
+        pathname: '/**',
+      },
       {
         protocol: 'http',
         hostname: '47.107.107.47',

BIN=BIN
public/assets/home/15.jpg


BIN=BIN
public/assets/home/15.png


BIN=BIN
public/assets/home/16.jpg


BIN=BIN
public/assets/home/16.png


BIN=BIN
public/assets/home/17.jpg


BIN=BIN
public/assets/home/17.png


BIN=BIN
public/assets/home/19.png


BIN=BIN
public/assets/home/21.png


BIN=BIN
public/assets/home/22.png


BIN=BIN
public/assets/home/clientIcon/10.png


BIN=BIN
public/assets/home/clientIcon/19.png


BIN=BIN
public/assets/home/clientIcon/6.png


+ 7 - 5
src/app/about/page.tsx

@@ -38,7 +38,7 @@ export default async function Home() {
     cache: "force-cache"
   })
 
-  const basicInfo = basicInfoRes.data[0] || {
+  const basicInfo = basicInfoRes.data?.[0] || {
     address: "",
     companyProfile: "",
     companyProfileUrl: "",
@@ -56,12 +56,14 @@ export default async function Home() {
   return (
     <>
       <AnimatedSection effect="slide" direction="left">
-        <div className="hidden sm:block">
+        {/*<div className="hidden sm:block">*/}
+          <div className="w-full h-full flex items-center justify-center text-white text-4xl font-bold">
           <Image src={"/assets/about/1.png"} alt={"关于我们"} width={1920} height={1080}/>
         </div>
-        <div className="sm:hidden">
-          <Image src={"/assets/about/23.png"} alt={"关于我们"} width={1920} height={1080}/>
-        </div>
+        {/*<div className="sm:hidden">*/}
+        {/*  <div className="w-full h-full flex items-center justify-center text-white text-4xl font-bold">*/}
+        {/*    <Image src={"/assets/about/23.png"} alt={"关于我们"} width={1920} height={1080}/>*/}
+        {/*  </div>*/}
       </AnimatedSection>
       <div className="w-full">
         <AnimatedSection effect="slide" direction="right">

+ 22 - 22
src/app/business/page.tsx

@@ -108,7 +108,7 @@ function Page() {
   return (
     <div className="bg-[#EFF5FB]">
       <AnimatedSection effect="slide" direction="right">
-        <div>
+        <div className="w-full h-full flex items-center justify-center text-white text-4xl font-bold">
           <Image src={"/assets/business/1.png"} alt={"banner"} width={1920} height={1080}/>
         </div>
       </AnimatedSection>
@@ -317,27 +317,27 @@ function Page() {
         </div>
       </AnimatedSection>
 
-      <AnimatedSection effect="slide" direction="right">
-        <div className="relative overflow-hidden mt-6">
-          <div className="max-w-7xl mx-auto p-4 sm:p-6">
-            <SubTitle title="市场拓展模型" color={"rgb(37,78,143)"}/>
-            <div className="w-full">
-              <div
-                className="hidden sm:block my-10 p-4 bg-white border border-solid border-black-200 rounded-2xl hover:shadow-md transition-shadow duration-300">
-                <div className="p-4">
-                  <AntdImage className={"w-full"} preview={false} src={"/assets/business/4.png"} alt={"市场拓展模型"}/>
-                </div>
-              </div>
-              <div
-                className="sm:hidden my-10 p-4 bg-white border border-solid border-black-200 rounded-2xl hover:shadow-md transition-shadow duration-300">
-                <div className="p-4">
-                  <AntdImage className={"w-full"} preview={true} src={"/assets/business/4.png"} alt={"市场拓展模型"}/>
-                </div>
-              </div>
-            </div>
-          </div>
-        </div>
-      </AnimatedSection>
+      {/*<AnimatedSection effect="slide" direction="right">*/}
+      {/*  <div className="relative overflow-hidden mt-6">*/}
+      {/*    <div className="max-w-7xl mx-auto p-4 sm:p-6">*/}
+      {/*      <SubTitle title="市场拓展模型" color={"rgb(37,78,143)"}/>*/}
+      {/*      <div className="w-full">*/}
+      {/*        <div*/}
+      {/*          className="hidden sm:block my-10 p-4 bg-white border border-solid border-black-200 rounded-2xl hover:shadow-md transition-shadow duration-300">*/}
+      {/*          <div className="p-4">*/}
+      {/*            <AntdImage className={"w-full"} preview={false} src={"/assets/business/4.png"} alt={"市场拓展模型"}/>*/}
+      {/*          </div>*/}
+      {/*        </div>*/}
+      {/*        <div*/}
+      {/*          className="sm:hidden my-10 p-4 bg-white border border-solid border-black-200 rounded-2xl hover:shadow-md transition-shadow duration-300">*/}
+      {/*          <div className="p-4">*/}
+      {/*            <AntdImage className={"w-full"} preview={true} src={"/assets/business/4.png"} alt={"市场拓展模型"}/>*/}
+      {/*          </div>*/}
+      {/*        </div>*/}
+      {/*      </div>*/}
+      {/*    </div>*/}
+      {/*  </div>*/}
+      {/*</AnimatedSection>*/}
     </div>
   );
 }

+ 1 - 1
src/app/layout.tsx

@@ -35,7 +35,7 @@ export default function RootLayout({
         (function() {
           var hm = document.createElement("script");
           hm.src = "https://hm.baidu.com/hm.js?4ef580994251660ce8c45997f722da54";
-          var s = document.getElementsByTagName("script")[0]; 
+          var s = document.getElementsByTagName("script")[0];
           s.parentNode.insertBefore(hm, s);
         })();
       `}

+ 1 - 1
src/app/news/page.tsx

@@ -51,7 +51,7 @@ export default async function NewsPage({
   return (
     <>
       <AnimatedSection effect="slide" direction="left">
-        <div>
+        <div className="w-full h-full flex items-center justify-center text-white text-4xl font-bold">
           <Image src={"/assets/news/1.png"} alt={"banner"} width={1920} height={1080}/>
         </div>
       </AnimatedSection>

+ 1 - 1
src/app/page.tsx

@@ -24,7 +24,7 @@ export default async function Home() {
     },
     cache: "force-cache"
   })
-  const basicInfo = basicInfoRes.data[0] || {
+  const basicInfo = basicInfoRes.data?.[0] || {
     address: "",
     companyProfile: "",
     companyProfileUrl: "",

+ 4 - 2
src/app/products/page.tsx

@@ -3,7 +3,7 @@ import MainTitle from "@/components/MainTitle"
 import ProductMenu from "@/components/products/ProductMenuClient"
 import {serverGet} from "@/utils/request";
 import AnimatedSection from "@/components/AnimatedSection";
-import {Suspense} from "react";
+import React, {Suspense} from "react";
 
 export default async function ProductShowcase() {
 
@@ -32,7 +32,9 @@ export default async function ProductShowcase() {
     <>
       <AnimatedSection effect="slide" direction="left">
         <div>
-          <Image src={"/assets/productions/1.png"} alt={"产品中心"} width={1920} height={1080}/>
+          <div className="w-full h-full flex items-center justify-center text-white text-4xl font-bold">
+            <Image src={"/assets/productions/1.png"} alt={"产品中心"} width={1920} height={1080}/>
+          </div>
         </div>
       </AnimatedSection>
 

+ 5 - 5
src/app/solutions/page.tsx

@@ -30,13 +30,13 @@ export default async function SolutionsPage({
   return (
     <>
       <AnimatedSection effect="slide" direction="left">
-        <div>
-          <Image src={"/assets/solutions/1.jpg"} alt={"banner"} width={1920} height={1080}/>
-        </div>
+          <div className="w-full h-full flex items-center justify-center text-white text-4xl font-bold">
+              <Image src={"/assets/solutions/1.jpg"} alt={"banner"} width={1920} height={1080}/>
+          </div>
       </AnimatedSection>
 
-      <div className={"py-6 sm:py-10"}>
-        <MainTitle title={"解决方案"} titleLetter={"SOLUTIONS"}/>
+        <div className={"py-6 sm:py-10"}>
+            <MainTitle title={"解决方案"} titleLetter={"SOLUTIONS"}/>
       </div>
 
       <AnimatedSection effect="scale">

+ 1 - 1
src/app/support/page.tsx

@@ -21,7 +21,7 @@ export default async function ServicePage() {
   return (
     <>
       <AnimatedSection effect="slide" direction="left">
-        <div>
+        <div className="w-full h-full flex items-center justify-center text-white text-4xl font-bold">
           <Image src={"/assets/support/1.png"} alt={"banner"} width={1920} height={1080}/>
         </div>
       </AnimatedSection>

+ 49 - 49
src/components/AnimatedSection.tsx

@@ -7,63 +7,63 @@ type Direction = "up" | "down" | "left" | "right"
 type Effect = "fade" | "slide" | "scale" | "rotate" | "flip"
 
 interface AnimatedSectionProps {
-  children: ReactNode
-  effect?: Effect
-  direction?: Direction // 仅在 slide 时有用
-  duration?: number
-  delay?: number
+    children: ReactNode
+    effect?: Effect
+    direction?: Direction // 仅在 slide 时有用
+    duration?: number
+    delay?: number
 }
 
 export default function AnimatedSection({
-                                          children,
-                                          effect = "slide",
-                                          direction = "up",
-                                          duration = 0.8,
-                                          delay = 0,
+                                            children,
+                                            effect = "slide",
+                                            direction = "up",
+                                            duration = 0.8,
+                                            delay = 0,
                                         }: AnimatedSectionProps) {
-  let initial: any = { opacity: 0 }
-  let animate: any = { opacity: 1 }
+    let initial: any = {opacity: 0}
+    let animate: any = {opacity: 1}
 
-  switch (effect) {
-    case "fade":
-      // 纯渐隐渐显
-      break
+    switch (effect) {
+        case "fade":
+            // 纯渐隐渐显
+            break
 
-    case "slide":
-      const offset: Record<Direction, { x: number; y: number }> = {
-        up: { x: 0, y: 40 },
-        down: { x: 0, y: -40 },
-        left: { x: 40, y: 0 },
-        right: { x: -40, y: 0 },
-      }
-      initial = { opacity: 0, ...offset[direction] }
-      animate = { opacity: 1, x: 0, y: 0 }
-      break
+        case "slide":
+            const offset: Record<Direction, { x: number; y: number }> = {
+                up: {x: 0, y: 40},
+                down: {x: 0, y: -40},
+                left: {x: 40, y: 0},
+                right: {x: -40, y: 0},
+            }
+            initial = {opacity: 0, ...offset[direction]}
+            animate = {opacity: 1, x: 0, y: 0}
+            break
 
-    case "scale":
-      initial = { opacity: 0, scale: 0.8 }
-      animate = { opacity: 1, scale: 1 }
-      break
+        case "scale":
+            initial = {opacity: 0, scale: 0.8}
+            animate = {opacity: 1, scale: 1}
+            break
 
-    case "rotate":
-      initial = { opacity: 0, rotate: -15 }
-      animate = { opacity: 1, rotate: 0 }
-      break
+        case "rotate":
+            initial = {opacity: 0, rotate: -15}
+            animate = {opacity: 1, rotate: 0}
+            break
 
-    case "flip":
-      initial = { opacity: 0, rotateY: 90 }
-      animate = { opacity: 1, rotateY: 0 }
-      break
-  }
+        case "flip":
+            initial = {opacity: 0, rotateY: 90}
+            animate = {opacity: 1, rotateY: 0}
+            break
+    }
 
-  return (
-    <motion.div
-      initial={initial}
-      whileInView={animate}
-      transition={{ duration, delay, ease: "easeOut" }}
-      viewport={{ once: true }}
-    >
-      {children}
-    </motion.div>
-  )
+    return (
+        <motion.div
+            initial={initial}
+            whileInView={animate}
+            transition={{duration, delay, ease: "easeOut"}}
+            viewport={{once: true}}
+        >
+            {children}
+        </motion.div>
+    )
 }

+ 0 - 2
src/components/ProductionHard.tsx

@@ -14,7 +14,6 @@ function ProductionHard({hardIntroduction}: {hardIntroduction: string}) {
           <div className="mb-12">
             <h1 className="text-2xl font-bold text-white mb-4">硬件简介</h1>
             <div className="w-24 h-1 bg-blue-400 mx-auto mb-8"></div>
-
             <p className="text-white/90 text-lg md:text-xl leading-relaxed max-w-4xl mx-auto">
               {hardIntroduction}
             </p>
@@ -25,7 +24,6 @@ function ProductionHard({hardIntroduction}: {hardIntroduction: string}) {
             <div className="flex flex-col items-center">
               <div
                 className="w-32 h-32 md:w-40 md:h-40 rounded-full bg-white/90 flex items-center justify-center mb-4 shadow-lg bg-[url('/assets/home/19.png')] bg-cover">
-
               </div>
             </div>
 

+ 3 - 3
src/components/ProductionSoft.tsx

@@ -27,15 +27,15 @@ function ProductionSoft({softIntroduction}: {softIntroduction: string}) {
 
         <div className="lg:col-span-3 grid grid-cols-2 gap-4">
           <div
-            className="col-span-2 bg-[url('/assets/home/15.png')] bg-cover from-teal-500 to-green-500 rounded-lg flex items-center justify-center text-white font-semibold text-lg">
+            className="col-span-2 bg-[url('/assets/home/15.jpg')] bg-cover from-teal-500 to-green-500 rounded-lg flex items-center justify-center text-white font-semibold text-lg">
           </div>
 
           <div
-            className="bg-[url('/assets/home/16.png')] bg-cover from-blue-600 to-cyan-500 rounded-lg flex items-center justify-center text-white font-semibold">
+            className="bg-[url('/assets/home/16.jpg')] bg-cover from-blue-600 to-cyan-500 rounded-lg flex items-center justify-center text-white font-semibold">
           </div>
 
           <div
-            className="bg-[url('/assets/home/17.png')] bg-cover from-slate-700 to-blue-800 rounded-lg flex items-center justify-center text-white font-semibold">
+            className="bg-[url('/assets/home/17.jpg')] bg-cover from-slate-700 to-blue-800 rounded-lg flex items-center justify-center text-white font-semibold">
           </div>
         </div>
       </div>

+ 1 - 1
src/components/about/Recruitment.tsx

@@ -12,7 +12,7 @@ interface JobCardProps {
 function Recruitment({ list }: { list: RecruitmentInfo[] }) {
   function JobCard({ id, title, location, positions, requirements }: JobCardProps) {
     return (
-      <div className="w-full sm:w-80 bg-[url('/assets/about/21.png')] bg-[length:103%_100%] bg-no-repeat rounded-2xl border border-blue-200 overflow-hidden shadow-sm hover:shadow-md transition-shadow">
+      <div className="w-full sm:w-80 bg-[url('/assets/about/')] bg-[length:103%_100%] bg-no-repeat rounded-2xl border border-blue-200 overflow-hidden shadow-sm hover:shadow-md transition-shadow">
         {/* Header */}
         <div className="bg-blue-500 text-white px-6 py-4 rounded-t-2xl">
           <h3 className="text-base sm:text-lg font-medium">{title}</h3>

+ 1 - 1
src/components/about/TopNav.tsx

@@ -9,7 +9,7 @@ function TopNav() {
       name: "公司简介",
       id: "section-0",
       img:"/assets/about/10.png",
-      activeImg:"/assets/about/11.png",
+      activeImg:"/assets/about/2.png",
     },
     {
       name: "发展历程",

+ 3 - 3
src/components/bannerCarousel.tsx

@@ -26,17 +26,17 @@ function BannerCarousel() {
             adaptiveHeight={true}
           >
             <div>
-              <div className="w-full h-full bg-blue-500 flex items-center justify-center text-white text-4xl font-bold">
+              <div className="w-full h-full flex items-center justify-center text-white text-4xl font-bold">
                 <Image src={"/assets/home/1.jpg"} alt={"轮播图图片"} width={1920} height={1080} />
               </div>
             </div>
             <div>
-              <div className="w-full h-full bg-green-500 flex items-center justify-center text-white text-4xl font-bold">
+              <div className="w-full h-full flex items-center justify-center text-white text-4xl font-bold">
                 <Image src={"/assets/home/2.jpg"} alt={"轮播图图片"} width={1920} height={1080} />
               </div>
             </div>
             <div>
-              <div className="w-full h-full bg-red-500 flex items-center justify-center text-white text-4xl font-bold">
+              <div className="w-full h-full flex items-center justify-center text-white text-4xl font-bold">
                 <Image src={"/assets/home/3.jpg"} alt={"轮播图图片"} width={1920} height={1080} />
               </div>
             </div>

+ 1 - 1
src/components/footerBlock.tsx

@@ -10,7 +10,7 @@ export default async function FooterBlock() {
     },
     cache: "force-cache"
   })
-  const basicInfo = basicInfoRes.data[0] || {
+  const basicInfo = basicInfoRes.data?.[0] || {
     address: "",
     companyProfile: "",
     companyProfileUrl: "",