Jelajahi Sumber

feat: 业务页面 Banner 替换为 5.png 和 6.png 的轮播图,并优化产品菜单默认选中逻辑

nahida 1 bulan lalu
induk
melakukan
4c2ec8647a
4 mengubah file dengan 33 tambahan dan 5 penghapusan
  1. TEMPAT SAMPAH
      public/assets/business/5.png
  2. TEMPAT SAMPAH
      public/assets/business/6.png
  3. 32 4
      src/app/business/page.tsx
  4. 1 1
      src/app/layout.tsx

TEMPAT SAMPAH
public/assets/business/5.png


TEMPAT SAMPAH
public/assets/business/6.png


+ 32 - 4
src/app/business/page.tsx

@@ -1,9 +1,10 @@
+"use client"
 import React from 'react';
 import Image from "next/image";
 import {ArrowRight, Coins, Database, Diamond, FileText, Gem, MessageCircle, Network, TrendingUp} from "lucide-react";
 import MainTitle from "@/components/MainTitle";
 import SubTitle from "@/components/subTitle";
-import {Image as AntdImage} from 'antd';
+import {Image as AntdImage, Carousel, ConfigProvider} from 'antd';
 import AnimatedSection from '@/components/AnimatedSection';
 
 function Page() {
@@ -108,9 +109,36 @@ function Page() {
   return (
     <div className="bg-[#EFF5FB]">
       <AnimatedSection effect="slide" direction="right">
-        <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>
+        <ConfigProvider
+          theme={{
+            components: {
+              Carousel: {
+                arrowSize: 28,
+              }
+            }
+          }}
+        >
+          <Carousel
+            autoplay
+            autoplaySpeed={3000}
+            arrows
+            dots={{
+              className: "bottom-4"
+            }}
+            adaptiveHeight={true}
+          >
+            <div>
+              <div className="w-full h-full flex items-center justify-center text-white text-4xl font-bold">
+                <Image src={"/assets/business/5.png"} alt={"banner"} width={1920} height={1080} className="w-full object-cover" />
+              </div>
+            </div>
+            <div>
+              <div className="w-full h-full flex items-center justify-center text-white text-4xl font-bold">
+                <Image src={"/assets/business/6.png"} alt={"banner"} width={1920} height={1080} className="w-full object-cover" />
+              </div>
+            </div>
+          </Carousel>
+        </ConfigProvider>
       </AnimatedSection>
 
       <div className="py-6 sm:py-10">

+ 1 - 1
src/app/layout.tsx

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