From fd06be84d57b45a9811b420494fc043ffe6c9048 Mon Sep 17 00:00:00 2001 From: king <2229249788@qq.com> Date: Mon, 11 Sep 2023 16:47:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=99=BB=E5=BD=95=E5=90=8E?= =?UTF-8?q?=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../videoInfo/components/catalogue.tsx | 34 +++++++++++-------- src/pages/business/videoInfo/videoInfo.tsx | 2 +- src/pages/login/login.tsx | 4 ++- src/pages/my/my.tsx | 2 +- 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/src/pages/business/videoInfo/components/catalogue.tsx b/src/pages/business/videoInfo/components/catalogue.tsx index 282a2c1..72521c6 100644 --- a/src/pages/business/videoInfo/components/catalogue.tsx +++ b/src/pages/business/videoInfo/components/catalogue.tsx @@ -20,6 +20,7 @@ interface Props { setHors: (is_complete: boolean, id: number) => void id: number //课程 playId: number | null + refresh: () => void } const tabList = [ @@ -29,7 +30,7 @@ const tabList = [ ] -const Catalogue: FC = ({data, setHors, id, playId}) => { +const Catalogue: FC = ({data, setHors, id, playId, refresh}) => { const [current, setCurrent] = useState(1) const [show, setShow] = useState(false) const [playing, setPlaying] = useState(false) @@ -152,19 +153,24 @@ const Catalogue: FC = ({data, setHors, id, playId}) => { {current === 0 && {data?.course.short_desc || data?.course.title}} {current === 1 && 课程目录 - {!token && } + { + !token && + } {data?.chapters.length ? Object.values(data?.chapters || {}).map((d, index) => diff --git a/src/pages/business/videoInfo/videoInfo.tsx b/src/pages/business/videoInfo/videoInfo.tsx index 3c6de8a..ffac5b1 100644 --- a/src/pages/business/videoInfo/videoInfo.tsx +++ b/src/pages/business/videoInfo/videoInfo.tsx @@ -121,7 +121,7 @@ const VideoInfo: FC = () => { 学习进度{((data?.learn_hour_records.length || 0) / (data?.course.class_hour || 1) * 100).toFixed(0)}% - + getData(false)}/> ) } diff --git a/src/pages/login/login.tsx b/src/pages/login/login.tsx index 54a6278..c626eba 100644 --- a/src/pages/login/login.tsx +++ b/src/pages/login/login.tsx @@ -57,7 +57,9 @@ const Login: FC = () => { setToken(token) setCompany(company) setLoading(false) - Taro.navigateBack() + setTimeout(() => { + Taro.navigateBack() + }) } else { Taro.setStorageSync('openid', catch_key) Taro.reLaunch({url: '/pages/check/check'}) diff --git a/src/pages/my/my.tsx b/src/pages/my/my.tsx index 93a34f3..3b4c2bd 100644 --- a/src/pages/my/my.tsx +++ b/src/pages/my/my.tsx @@ -89,7 +89,7 @@ const My: FC = () => { - +
companyList.length >= 2 && setCompanyShow(true)}/>