|
|
@ -192,7 +192,11 @@ const Course: FC<Props> = ({id, courseId, preview, curEnd}: Props) => { |
|
|
|
round |
|
|
|
round |
|
|
|
onAfterLeave={again} |
|
|
|
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) => |
|
|
|
{examAll?.[time]?.map((d, index) => |
|
|
|
<SwiperItem> |
|
|
|
<SwiperItem> |
|
|
|
<ScrollView style='height:70vh' scrollY> |
|
|
|
<ScrollView style='height:70vh' scrollY> |
|
|
@ -204,6 +208,7 @@ const Course: FC<Props> = ({id, courseId, preview, curEnd}: Props) => { |
|
|
|
onUpAndDown={(index) => setIndex(index)} |
|
|
|
onUpAndDown={(index) => setIndex(index)} |
|
|
|
index={index} |
|
|
|
index={index} |
|
|
|
validate={validate} |
|
|
|
validate={validate} |
|
|
|
|
|
|
|
end={index === examAll?.[time].length - 1} |
|
|
|
/>} |
|
|
|
/>} |
|
|
|
{d.question_type === 2 && |
|
|
|
{d.question_type === 2 && |
|
|
|
<Judge |
|
|
|
<Judge |
|
|
@ -213,6 +218,7 @@ const Course: FC<Props> = ({id, courseId, preview, curEnd}: Props) => { |
|
|
|
data={d as ShareSubject} |
|
|
|
data={d as ShareSubject} |
|
|
|
validate={validate} |
|
|
|
validate={validate} |
|
|
|
onAnswer={onAnswer} |
|
|
|
onAnswer={onAnswer} |
|
|
|
|
|
|
|
end={index === examAll?.[time].length} |
|
|
|
/>} |
|
|
|
/>} |
|
|
|
{d.question_type === 3 && |
|
|
|
{d.question_type === 3 && |
|
|
|
<ShortAnswer |
|
|
|
<ShortAnswer |
|
|
@ -222,27 +228,19 @@ const Course: FC<Props> = ({id, courseId, preview, curEnd}: Props) => { |
|
|
|
onUpAndDown={(index) => setIndex(index)} |
|
|
|
onUpAndDown={(index) => setIndex(index)} |
|
|
|
index={index} |
|
|
|
index={index} |
|
|
|
validate={validate} |
|
|
|
validate={validate} |
|
|
|
|
|
|
|
end={index === examAll?.[time].length} |
|
|
|
/>} |
|
|
|
/>} |
|
|
|
</ScrollView> |
|
|
|
</ScrollView> |
|
|
|
</SwiperItem> |
|
|
|
</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> |
|
|
|
</Swiper> |
|
|
|
<View className='statistics'> |
|
|
|
<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> |
|
|
|
</View> |
|
|
|
</PageContainer> |
|
|
|
</PageContainer> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|