|
|
|
@ -192,7 +192,11 @@ const Course: FC<Props> = ({id, courseId, preview, curEnd}: Props) => { |
|
|
|
|
round |
|
|
|
|
onAfterLeave={again} |
|
|
|
|
> |
|
|
|
|
<Swiper style={{height: "70vh"}} snapToEdge current={index}> |
|
|
|
|
<Swiper |
|
|
|
|
style={{height: "70vh"}} |
|
|
|
|
snapToEdge |
|
|
|
|
current={index} |
|
|
|
|
onChange={(e) => setIndex((e.target as any).value)}> |
|
|
|
|
{examAll?.[time]?.map((d, index) => |
|
|
|
|
<SwiperItem> |
|
|
|
|
<ScrollView style='height:70vh' scrollY> |
|
|
|
@ -204,6 +208,7 @@ const Course: FC<Props> = ({id, courseId, preview, curEnd}: Props) => { |
|
|
|
|
onUpAndDown={(index) => setIndex(index)} |
|
|
|
|
index={index} |
|
|
|
|
validate={validate} |
|
|
|
|
end={index === examAll?.[time].length - 1} |
|
|
|
|
/>} |
|
|
|
|
{d.question_type === 2 && |
|
|
|
|
<Judge |
|
|
|
@ -213,6 +218,7 @@ const Course: FC<Props> = ({id, courseId, preview, curEnd}: Props) => { |
|
|
|
|
data={d as ShareSubject} |
|
|
|
|
validate={validate} |
|
|
|
|
onAnswer={onAnswer} |
|
|
|
|
end={index === examAll?.[time].length} |
|
|
|
|
/>} |
|
|
|
|
{d.question_type === 3 && |
|
|
|
|
<ShortAnswer |
|
|
|
@ -222,27 +228,19 @@ const Course: FC<Props> = ({id, courseId, preview, curEnd}: Props) => { |
|
|
|
|
onUpAndDown={(index) => setIndex(index)} |
|
|
|
|
index={index} |
|
|
|
|
validate={validate} |
|
|
|
|
end={index === examAll?.[time].length} |
|
|
|
|
/>} |
|
|
|
|
</ScrollView> |
|
|
|
|
</SwiperItem> |
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
<SwiperItem> |
|
|
|
|
<ScrollView style='height:70vh' scrollY> |
|
|
|
|
<View className='mt-10 ml-4'> |
|
|
|
|
<View className='mt-3'>正确:{newRecord.filter(d => d).length}</View> |
|
|
|
|
<View className='mt-3'>错误:{newRecord.filter(d => !d).length}</View> |
|
|
|
|
<View className='mt-3'>剩余答题次数{frequency}</View> |
|
|
|
|
</View> |
|
|
|
|
|
|
|
|
|
{!validate && <Button className='button mt-10' onClick={() => setValidate(true)}>提交</Button>} |
|
|
|
|
{frequency > 0 && validate && <Button className='button mt-10' onClick={onceMore}>再来一次</Button>} |
|
|
|
|
{frequency === 0 && validate && <Button className='button mt-10' onClick={again}>重新学习</Button>} |
|
|
|
|
</ScrollView> |
|
|
|
|
</SwiperItem> |
|
|
|
|
</Swiper> |
|
|
|
|
<View className='statistics'> |
|
|
|
|
<View>共{examAll?.[time]?.length}题</View> |
|
|
|
|
<View>考试次数{frequency}</View> |
|
|
|
|
<View>{index + 1}/{examAll?.[time]?.length}</View> |
|
|
|
|
|
|
|
|
|
{!validate && <Button className='button' onClick={() => setValidate(true)}>提交</Button>} |
|
|
|
|
{frequency > 0 && validate && <Button className='button' onClick={onceMore}>再来一次</Button>} |
|
|
|
|
{frequency === 0 && validate && <Button className='button' onClick={again}>重新学习</Button>} |
|
|
|
|
</View> |
|
|
|
|
</PageContainer> |
|
|
|
|
</view> |
|
|
|
|