Commit d84e18eb authored by 罗超's avatar 罗超

2

parent 594ea149
<template>
<view class="wordTest">
<swiper class="swiper" @change="changeSwiper" :current="curTest">
<swiper-item v-for="(item, index) in reviewGroupList" :key="index" class="swiper-item">
<van-skeleton title row="10" v-if="reviewGroupList.length===0&&prepGroupList.length===0"/>
<swiper class="swiper" @change="changeSwiper" :current="curTest" v-else>
<swiper-item v-for="(item, index) in reviewGroupList" :key="index" class="swiper-item" v-if="item">
<Choice v-if="item.QuestionTypeId == 1" :item="item" @next="next($event, item)"></Choice>
<FillIn v-if="item.QuestionTypeId == 3" :item="item" @next="next($event, item)"></FillIn>
</swiper-item>
<swiper-item v-for="(item, index) in prepGroupList" :key="index" class="swiper-item">
<swiper-item v-for="(item, index) in prepGroupList" :key="index" class="swiper-item" v-if="item">
<Choice v-if="item.QuestionTypeId == 1" :item="item" @next="next($event, item)"></Choice>
<FillIn v-if="item.QuestionTypeId == 3" :item="item" @next="next($event, item)"></FillIn>
</swiper-item>
......@@ -47,7 +48,7 @@
NextChapterId: 0,
},
startTime: "",
curTest: 33,
curTest: 0,
reviewGroupList: [],
prepGroupList: [],
});
......@@ -63,13 +64,10 @@
changeSwiper(val) {
data.curTest = val.detail.current;
const total = data.reviewGroupList.length + data.prepGroupList.length
if (data.curTest == total) {
console.log('wan', data.curTest, total)
methods.submitWordsTest()
data.curTest = total - 1
}
console.log(2, data.curTest, total)
},
next(val, item) {
if (val) {
......
<template>
<view class="word">
<swiper class="swiper" next-margin="60rpx" @change="swiperChange" :current="current">
<van-skeleton title row="10" v-if="StudyList.length===0&&ReviewList.length===0"/>
<swiper class="swiper" next-margin="60rpx" @change="swiperChange" :current="current" v-else>
<swiper-item v-for="(item,index) in StudyList" :key="index" class="swiper-item">
<Pronunciation :item="item" :cur="index+1" :total="StudyList.length"></Pronunciation>
</swiper-item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment