修改小程序考题开始和结束事件

main
king 1 year ago
parent c85cecbf0f
commit 8ad043d735
  1. 4
      src/components/video/video.tsx
  2. 5
      src/pages/business/videoInfo/components/catalogue.tsx
  3. 26
      src/pages/business/videoInfo/components/course.tsx

@ -45,12 +45,10 @@ const HVideo: FC<HVideoOptions> = (opt: HVideoOptions) => {
opt.breakpoint.forEach(d => {
if (time < d + deviation && time > d - deviation) {
video?.pause()
video?.seek(d - deviation)
if (process.env.TARO_ENV === 'h5') {
try {
document?.exitFullscreen().then()
} catch (e) {
}
} catch (e) {}
}
video?.exitFullScreen()
opt.onBreakpoint(d)

@ -175,10 +175,9 @@ const Catalogue: FC<Props> = ({data, setHors, id, playId}) => {
<View className='Videobutton'>
{
playing ? <MyButton style={{flex: '1'}} onClick={onPause}>{JSON.stringify(playing)}</MyButton>
: <MyButton style={{flex: '1'}} onClick={learning}>{JSON.stringify(playing)}</MyButton>
playing ? <MyButton style={{flex: '1'}} onClick={onPause}></MyButton>
: <MyButton style={{flex: '1'}} onClick={learning}></MyButton>
}
<View className='px-3' onClick={() => setShow(true)}>...</View>
</View>

@ -129,24 +129,22 @@ const Course: FC<Props> = ({id, courseId, preview, curEnd}) => {
setTime={videoSeek}
/>
<CustomPageContainer
show={show}
position='bottom'
>
<CustomPageContainer show={show} position='bottom'>
<View>
<View className='text-center mt-2 text-muted'>
<Text className='mr-2'>{formatMinute(time)}</Text>
</View>
{examAll?.[time]?.slice(0, 1)?.map((d) =>
<ScrollView style='height:60vh' scrollY key={d.id}>
{d.question_type === 2 &&
<Judge
data={d as ShareSubject}
validate={validate}
onAnswer={(isAnswer) => setRecord([isAnswer])}
/>}
</ScrollView>
)}
{
examAll?.[time]?.slice(0, 1)?.map((d) =>
<ScrollView style='height:60vh' scrollY key={d.id}>
{d.question_type === 2 &&
<Judge
data={d as ShareSubject}
validate={validate}
onAnswer={(isAnswer) => setRecord([isAnswer])}
/>}
</ScrollView>)
}
<View>
<View className='statistics'>

Loading…
Cancel
Save