From bae5ece6d7358521fa1bdb8f77fb2fd148a3da48 Mon Sep 17 00:00:00 2001 From: sunlizhou <296190577@qq.com> Date: Wed, 3 Jan 2024 09:19:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89ui=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 4 ++-- src/components/videoList/videoList.tsx | 2 +- src/pages/preview/brand/info/info.tsx | 2 +- src/pages/preview/health/health.tsx | 10 ++++++++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.env b/.env index a9c9848..659119c 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ #TARO_APP_API=https://yjx.dev.yaojiankang.top #TARO_APP_API=https://mooc.yaojiankang.top -TARO_APP_API=https://xingui.yaojiankang.top +#TARO_APP_API=https://xingui.yaojiankang.top #TARO_APP_API=https://shopfix.yaojiankang.top -#TARO_APP_API=https://playedu.yaojiankang.top +TARO_APP_API=https://playedu.yaojiankang.top TARO_APP_LGOIN=true diff --git a/src/components/videoList/videoList.tsx b/src/components/videoList/videoList.tsx index 0fb44a3..8f76274 100644 --- a/src/components/videoList/videoList.tsx +++ b/src/components/videoList/videoList.tsx @@ -42,7 +42,7 @@ const VideoList: FC = (props) => { - + {data.title} {data.introduction} diff --git a/src/pages/preview/brand/info/info.tsx b/src/pages/preview/brand/info/info.tsx index ccf290e..50065ce 100644 --- a/src/pages/preview/brand/info/info.tsx +++ b/src/pages/preview/brand/info/info.tsx @@ -103,7 +103,7 @@ const BrandInfo: FC = () => { onChange={onChange} > {brandInfo?.introductory_video_resource?.url && - + } { (brandInfo?.brand_album?.length || 0) > 0 diff --git a/src/pages/preview/health/health.tsx b/src/pages/preview/health/health.tsx index de4417f..89a64d7 100644 --- a/src/pages/preview/health/health.tsx +++ b/src/pages/preview/health/health.tsx @@ -13,6 +13,7 @@ const Health: FC = () => { const [data, setData] = useState([]) const [total, setTotal] = useState(0) const [enable, setEnable] = useState(true) + const [statusText,setStatusText] = useState("正在加载~") async function getData(page: number) { try { @@ -28,7 +29,12 @@ const Health: FC = () => { } useReachBottom(() => { - data.length < total && setPage(page + 1) + if(data.length < total ) { + setPage(page + 1) + setStatusText("加载中...") + return + } + setStatusText("没有更多了") }) useEffect(() => { @@ -45,7 +51,7 @@ const Health: FC = () => { {data.map(d => )} - + : getData(1)} name='暂无数据'/> }