From c99493e9de17760638c0142902dfdd4d595e0119 Mon Sep 17 00:00:00 2001 From: king <2229249788@qq.com> Date: Fri, 1 Sep 2023 18:26:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AD=A6=E4=B9=A0=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 4 +-- src/pages/index/components/videoList.tsx | 40 ++++++++++++----------- src/pages/my/components/header/header.tsx | 2 +- src/pages/my/components/header/time.tsx | 6 +++- 4 files changed, 29 insertions(+), 23 deletions(-) diff --git a/.env b/.env index 3852d45..86e2b46 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ -TARO_APP_API=https://yjx.dev.yaojiankang.top -#TARO_APP_API=https://mooc.yaojiankang.top +#TARO_APP_API=https://yjx.dev.yaojiankang.top +TARO_APP_API=https://mooc.yaojiankang.top #TARO_APP_API=https://shopfix.yaojiankang.top #TARO_APP_API=https://playedu.yaojiankang.top TARO_APP_LGOIN=true diff --git a/src/pages/index/components/videoList.tsx b/src/pages/index/components/videoList.tsx index 10bffd6..eb59fb4 100644 --- a/src/pages/index/components/videoList.tsx +++ b/src/pages/index/components/videoList.tsx @@ -77,14 +77,14 @@ export const VideoList: FC = ({categoryKey, setCategoryKey}) => { } // eventsIndex.on(({id}) => { - // if (id == null) return; - // for (const [index, notFinished] of data.is_not_finished.entries()) { - // if (notFinished.id === id) { - // data.is_finished.push(notFinished) - // data.is_not_finished.splice(index, 1) - // return - // } - // } + // if (id == null) return; + // for (const [index, notFinished] of data.is_not_finished.entries()) { + // if (notFinished.id === id) { + // data.is_finished.push(notFinished) + // data.is_not_finished.splice(index, 1) + // return + // } + // } // }) useDidShow(() => { @@ -123,17 +123,19 @@ export const VideoList: FC = ({categoryKey, setCategoryKey}) => { && key === 'is_required' ? : value?.length ? <> - {value?.map(c => - )} - 暂无更多 + { + value?.map(c => + ) + } + 暂无更多 : } diff --git a/src/pages/my/components/header/header.tsx b/src/pages/my/components/header/header.tsx index b02cd0e..0235cbf 100644 --- a/src/pages/my/components/header/header.tsx +++ b/src/pages/my/components/header/header.tsx @@ -29,7 +29,7 @@ const Header = ({showCompany}:{showCompany:()=> void}) => { { empty() - }}>注册/登录 + }}>请登录 } diff --git a/src/pages/my/components/header/time.tsx b/src/pages/my/components/header/time.tsx index 28f5664..ef2e98c 100644 --- a/src/pages/my/components/header/time.tsx +++ b/src/pages/my/components/header/time.tsx @@ -47,6 +47,10 @@ const Time: FC = () => { }) function jump(type?: number) { + if (!token) { + Taro.navigateTo({url: '/pages/login/login'}) + return; + } if (!type) return; Taro.navigateTo({url: "/pages/business/courType/courType?type=" + type}) } @@ -61,7 +65,7 @@ const Time: FC = () => { {d.title} - { token && {d.time}} + {token && {d.time}}