From dd3d6b43a4a81e8f10b41f6d9f548c3f6162ba3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Fri, 26 Sep 2025 16:38:16 +0800 Subject: [PATCH] =?UTF-8?q?refactor(index):=E4=BC=98=E5=8C=96=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E5=B8=83=E5=B1=80=E4=B8=8E=E6=A0=B7=E5=BC=8F-=20?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=20Banner=20=E7=BB=84=E4=BB=B6=E4=B8=AD?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E7=9A=84=20View=20=E5=8C=85=E8=A3=B9?= =?UTF-8?q?=E5=B1=82=EF=BC=8C=E7=AE=80=E5=8C=96=E7=BB=93=E6=9E=84-=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=BD=AE=E6=92=AD=E5=9B=BE=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=EF=BC=8C=E6=8F=90=E5=8D=87=E8=A7=A6=E6=91=B8?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E4=BD=93=E9=AA=8C=20-=E4=B8=BA=E4=BB=8A?= =?UTF-8?q?=E6=97=A5=E7=83=AD=E5=8D=96=E5=92=8C=E7=A4=BE=E5=8C=BA=E6=8B=BC?= =?UTF-8?q?=E5=9B=A2=E5=8C=BA=E5=9F=9F=E6=B7=BB=E5=8A=A0=E9=98=B4=E5=BD=B1?= =?UTF-8?q?=E6=95=88=E6=9E=9C-=20=E5=87=8F=E5=B0=8F=E7=A4=BE=E5=8C=BA?= =?UTF-8?q?=E6=8B=BC=E5=9B=A2=E5=9B=BE=E7=89=87=E9=AB=98=E5=BA=A6=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=A7=86=E8=A7=89=E6=AF=94=E4=BE=8B=20-=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=83=AD=E9=94=80=E6=A6=9C=E5=8D=95=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F=E9=97=B4=E8=B7=9D=EF=BC=8C=E6=94=B9=E5=96=84=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E7=B4=A7=E5=87=91=E5=BA=A6-=20=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84=E5=90=B8=E9=A1=B6=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E9=80=BB=E8=BE=91=EF=BC=8C=E5=87=8F=E5=B0=91=E5=86=97?= =?UTF-8?q?=E4=BD=99=E4=BB=A3=E7=A0=81=20-=20=E6=9B=B4=E6=96=B0=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=A0=87=E9=A2=98=E4=B8=BA=E6=9B=B4=E7=9B=B4=E8=A7=82?= =?UTF-8?q?=E7=9A=84=E9=A6=96=E9=A1=B5=E6=A0=87=E8=AF=86-=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E9=A6=96=E9=A1=B5=E7=BB=84=E4=BB=B6=E7=BB=93=E6=9E=84?= =?UTF-8?q?=EF=BC=8C=E6=8F=90=E5=8D=87=E6=B8=B2=E6=9F=93=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/Banner.tsx | 63 +++++++++++++++------------------ src/pages/index/BestSellers.tsx | 2 +- src/pages/index/index.tsx | 16 ++++----- 3 files changed, 37 insertions(+), 44 deletions(-) diff --git a/src/pages/index/Banner.tsx b/src/pages/index/Banner.tsx index a019d1d..0d2a214 100644 --- a/src/pages/index/Banner.tsx +++ b/src/pages/index/Banner.tsx @@ -99,47 +99,40 @@ const MyPage = () => { {/* 左侧轮播图区域 */} - - - {carouselData && carouselData?.imageList?.map((img, index) => ( - - navTo(`${img.path}`)} - lazyLoad={false} - style={{ - height: `${carouselHeight}px`, - borderRadius: '4px', - pointerEvents: 'auto' - }} - /> - - ))} - - + {carouselData && carouselData?.imageList?.map((img, index) => ( + + navTo(`${img.path}`)} + lazyLoad={false} + style={{ + height: `${carouselHeight}px`, + borderRadius: '4px' + }} + /> + + ))} + {/* 右侧上下图片区域 - 从API获取数据 */} {/* 上层图片 - 使用今日热卖素材 */} - + 今日热卖 { {/* 下层图片 - 使用社区拼团素材 */} - + 走进社区 void}) => { - + {/* 今日主推 */} {tab1value == '0' && list?.map((item, index) => { return ( diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 7547bec..0d20808 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -14,7 +14,7 @@ import './index.scss' function Home() { // 吸顶状态 - const [stickyStatus, setStickyStatus] = useState(false) + // const [stickyStatus, setStickyStatus] = useState(false) // Tabs粘性状态 const [tabsStickyStatus, setTabsStickyStatus] = useState(false) @@ -23,7 +23,7 @@ function Home() { const userId = Taro.getStorageSync('UserId'); return { - title: '网宿小店 - 网宿软件', + title: '🏠 首页 🏠', path: userId ? `/pages/index/index?inviter=${userId}&source=share&t=${Date.now()}` : `/pages/index/index`, success: function () { console.log('首页分享成功'); @@ -81,11 +81,11 @@ function Home() { }); }; - const onSticky = (item: IArguments) => { - if(item){ - setStickyStatus(!stickyStatus) - } - } + // const onSticky = (item: IArguments) => { + // if(item){ + // setStickyStatus(!stickyStatus) + // } + // } // 处理Tabs粘性状态变化 const handleTabsStickyChange = (isSticky: boolean) => { @@ -165,7 +165,7 @@ function Home() { ) : (
)} - +