|
|
@@ -9,6 +9,8 @@ import HomeNewArrival from "./HomeNewArrival";
|
|
|
import MiddleImageSwiper from "./MiddleImageSwiper";
|
|
|
import Trending from "./Trending";
|
|
|
import RecommendedProducts from "./RecommendedProducts";
|
|
|
+import Image from "next/image";
|
|
|
+import Link from "next/link";
|
|
|
// import CategoryTabSwiper from "./CategoryTabSwiper ";
|
|
|
import type {HomeApiData,HomeProduct } from "@/types/home/type"
|
|
|
import {CustomerService} from "@/components/common/CustomerService/CustomerService";
|
|
|
@@ -114,16 +116,18 @@ export default function HomeContent({ homeData }: HomeContentProps) {
|
|
|
// 3. 筛选new Arrival板块
|
|
|
const newArrivalSection = sections.find(sec => sec.sort_order === 6);
|
|
|
// 4. 筛选7板块
|
|
|
- const zeroWearImageSection = sections.find(sec => sec.sort_order === 8);
|
|
|
+ const zeroWearImageSection = sections.find(sec => sec.sort_order === 7);
|
|
|
const zeroWearImage= zeroWearImageSection?.images ?? [];
|
|
|
// 4. 筛选7板块
|
|
|
- const zeroWearSection = sections.find(sec => sec.name === "7");
|
|
|
+ const zeroWearSection = sections.find(sec => sec.sort_order === 8);
|
|
|
const zeroWear: HomeProduct[] = zeroWearSection?.products ?? [];
|
|
|
// 4. 筛选trendingSection板块
|
|
|
- const trendingSection = sections.find(sec => sec.name === "Trending_Now");
|
|
|
-
|
|
|
+ const trendingSection = sections.find(sec => sec.sort_order === 9);
|
|
|
+ // 4. 筛选7板块
|
|
|
+ const bottomBannerSection = sections.find(sec => sec.sort_order === 10);
|
|
|
+ const bottomBanner= bottomBannerSection?.images ?? [];
|
|
|
// 4. Recommended
|
|
|
- const recommendedSection = sections.find(sec => sec.name === "Recommended_For_You");
|
|
|
+ const recommendedSection = sections.find(sec => sec.sort_order === 11);
|
|
|
// const recommended: HomeProduct[] = recommendedSection?.products ?? [];
|
|
|
|
|
|
return (<>
|
|
|
@@ -132,8 +136,6 @@ export default function HomeContent({ homeData }: HomeContentProps) {
|
|
|
<div className="w-full relative">
|
|
|
<TopImageSwiper bannerImages={bannerImages} />
|
|
|
</div>
|
|
|
-
|
|
|
- {/* 服务标签栏 */}
|
|
|
<div className="flex justify-center items-center gap-[200px] p-4 bg-[#EAE9E1]">
|
|
|
{MOCK_DATA.services.map((item, idx) => (
|
|
|
<div key={idx} className="flex items-center gap-2">
|
|
|
@@ -142,6 +144,9 @@ export default function HomeContent({ homeData }: HomeContentProps) {
|
|
|
</div>
|
|
|
))}
|
|
|
</div>
|
|
|
+ {/* 服务标签栏 */}
|
|
|
+ <div className="w-full max-w-480 m-auto">
|
|
|
+
|
|
|
{/* 分类快捷入口 */}
|
|
|
<JinGangSwiper jinGangSection={jinGangSection} />
|
|
|
{/* 热销商品区 */}
|
|
|
@@ -150,7 +155,20 @@ export default function HomeContent({ homeData }: HomeContentProps) {
|
|
|
<HomeNewArrival newArrivalSection={newArrivalSection} />
|
|
|
<MiddleImageSwiper zeroWear={zeroWear} zeroWearImage={zeroWearImage} />
|
|
|
<Trending trendingSection={trendingSection}/>
|
|
|
+ {
|
|
|
+ (bottomBanner && bottomBanner.length !== 0) ? (
|
|
|
+ <Link href={bottomBanner[0].link} className="relative w-full aspect-[3/4] mt-8">
|
|
|
+ <Image
|
|
|
+ src={bottomBanner[0].image}
|
|
|
+ alt={bottomBanner[0].title}
|
|
|
+ fill
|
|
|
+ className="object-cover rounded-md"
|
|
|
+ />
|
|
|
+ </Link>
|
|
|
+ ) : null
|
|
|
+ }
|
|
|
<RecommendedProducts recommendedSection={recommendedSection} />
|
|
|
+ </div>
|
|
|
{/* <CategoryTabSwiper /> */}
|
|
|
</div>
|
|
|
<CustomerService />
|