Jelajahi Sumber

safari浏览器中分类导航弹窗底部货币切换按钮被遮挡问题;首页样式;

fogwind 3 hari lalu
induk
melakukan
294c58d56a

+ 3 - 4
src/app/(public)/_components/HomeContent.tsx

@@ -58,11 +58,10 @@ export default function HomeContent({ homeData }: HomeContentProps) {
   const recommendedSection = sections.find(sec => sec.showstyle === '11');
   const recommended: HomeProduct[] = recommendedSection?.products ?? [];
   return (<>
-    <div className="min-h-screen bg-white font-sans">
+    <div className="bg-white font-sans">
       {/* 顶部Banner */}
-      <div className="w-full relative">
-        <TopImageSwiper  bannerImages={bannerImages}  />
-      </div>
+      <TopImageSwiper  bannerImages={bannerImages}  />
+
 
       {/* 服务标签栏 */}
       <div className="grid grid-cols-2 md:grid-cols-4 gap-4 p-4 bg-[#EAE9E1]">

+ 3 - 9
src/app/(public)/_components/TopImageSwiper.tsx

@@ -19,26 +19,20 @@ const TopImageSwiper = ({ bannerImages }: TopImageSwiperProps) => {
   if (!bannerImages || bannerImages.length === 0) return null;
 
   return (
-    <div className="w-full mx-auto ">
+    <div className="w-full">
       <Swiper
-        slidesPerView={1}
-        spaceBetween={0}
+
         loop={true} // 无限轮播
         autoplay={{
           delay: 2500,
           disableOnInteraction: false,
         }}
         modules={[Autoplay]}
-        className="h-auto  overflow-hidden"
+  
       >
         {/* ✅ 自动遍历图片数组,一行代码搞定所有图片 */}
         {bannerImages .map((item, index) => (
           <SwiperSlide key={index}>
-            <img
-                 src={item.image}
-              alt={item.title}
-              className="w-full h-full object-cover"
-            />
             <Link href={item.link} className="w-full">
               <Image 
                   width={390}

+ 1 - 1
src/app/(public)/layout.tsx

@@ -10,7 +10,7 @@ export default async function PublicLayout({
   return (
     <>
       <Navbar />
-      <div className="mx-auto min-h-[calc(100vh-580px)] w-full">
+      <div className="mx-auto w-full">
         {children}
       </div>
       <Footer />

+ 3 - 4
src/components/layout/navbar/MobileMenu.tsx

@@ -104,13 +104,12 @@ export default function MobileMenu({ menu, isOpen, onClose,isGuest }: MobileMenu
                 x: isOpen ? 0 : "-100%"
               }}
               transition={{ type: "spring", damping: 25, stiffness: 200 }}
-              className="fixed left-0 z-50 w-full max-w-[448px] border-r border-neutral-200 bg-white dark:border-neutral-800 dark:bg-black lg:hidden drawer-scrollbar-hidden"
+              className="fixed left-0 z-50 w-full border-r border-neutral-200 bg-white drawer-scrollbar-hidden"
               style={{
                 top: "0px",
                 bottom: "0px",
                 width: "100%",
-                maxWidth: "448px",
-                height: "calc(var(--visual-viewport-height) - 132px)",
+                height: "100%",
               }}
             >
               {/* <div className="h-full overflow-y-auto px-4 py-4 drawer-scrollbar-hidden">
@@ -137,7 +136,7 @@ export default function MobileMenu({ menu, isOpen, onClose,isGuest }: MobileMenu
                   ))}
                 </ul>
               </div> */}
-             <div className="h-screen flex flex-col overflow-hidden bg-white">
+             <div className="h-full flex flex-col overflow-hidden bg-white">
              
                <div className="flex justify-between items-center px-4 h-13.5 border-b border-[#E1E1E1FF]">
                  <h2 className="text-base font-medium">VIP Rewards</h2>