|
|
|
@ -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<Props> = ({data, setHors, id, playId}) => { |
|
|
|
|
const Catalogue: FC<Props> = ({data, setHors, id, playId, refresh}) => { |
|
|
|
|
const [current, setCurrent] = useState(1) |
|
|
|
|
const [show, setShow] = useState(false) |
|
|
|
|
const [playing, setPlaying] = useState(false) |
|
|
|
@ -152,7 +153,11 @@ const Catalogue: FC<Props> = ({data, setHors, id, playId}) => { |
|
|
|
|
{current === 0 && <View className='short_desc'>{data?.course.short_desc || data?.course.title}</View>} |
|
|
|
|
{current === 1 && <View> |
|
|
|
|
<View className='my-2'>课程目录</View> |
|
|
|
|
{!token && <LoginView offImage style={{ |
|
|
|
|
{ |
|
|
|
|
!token && <LoginView |
|
|
|
|
onSuccess={refresh} |
|
|
|
|
offImage |
|
|
|
|
style={{ |
|
|
|
|
position: 'absolute', |
|
|
|
|
left: 0, |
|
|
|
|
height: 'auto', |
|
|
|
@ -164,7 +169,8 @@ const Catalogue: FC<Props> = ({data, setHors, id, playId}) => { |
|
|
|
|
justifyContent: 'flex-end', |
|
|
|
|
flexDirection: 'column-reverse', |
|
|
|
|
background: 'rgba(255,255,255,.9)' |
|
|
|
|
}}/>} |
|
|
|
|
}}/> |
|
|
|
|
} |
|
|
|
|
{data?.chapters.length |
|
|
|
|
? Object.values(data?.chapters || {}).map((d, index) => <View key={d.id}> |
|
|
|
|
<Collapse title={`${index + 1}.${d.name}`}> |
|
|
|
|