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)}/>