提交 addff3da authored 作者: lihuihui's avatar lihuihui

updata

上级 9d5aa06e
......@@ -38,18 +38,18 @@
</template>
</ul>
</template>
<template v-if="answerData['5'].data.length !=0">
<div class="title" >{{ answerData['5'].title }}</div>
<template v-if="answerData['6'].data.length !=0">
<div class="title" >{{ answerData['6'].title }}</div>
<ul>
<template v-for="(item, index) in answerData['5'].data">
<template v-for="(item, index) in answerData['6'].data">
<li @click="go(item.id)" :data-id="item.id" :key="index" :class="item.sign == true ? 'active2' : item.answer == undefined ? 'active3' : item.answer.length == 0 ? 'acitve3' : 'active1'">{{ item.num }}</li>
</template>
</ul>
</template>
<template v-if="answerData['6'].data.length !=0">
<div class="title" >{{ answerData['6'].title }}</div>
<template v-if="answerData['5'].data.length !=0">
<div class="title" >{{ answerData['5'].title }}</div>
<ul>
<template v-for="(item, index) in answerData['6'].data">
<template v-for="(item, index) in answerData['5'].data">
<li @click="go(item.id)" :data-id="item.id" :key="index" :class="item.sign == true ? 'active2' : item.answer == undefined ? 'active3' : item.answer.length == 0 ? 'acitve3' : 'active1'">{{ item.num }}</li>
</template>
</ul>
......
......@@ -66,18 +66,18 @@
</template>
</ul>
</template>
<template v-if="answerData['5'].data.length !=0">
<div class="title" >{{ answerData['5'].title }}</div>
<template v-if="answerData['6'].data.length !=0">
<div class="title" >{{ answerData['6'].title }}</div>
<ul>
<template v-for="(item, index) in answerData['5'].data">
<template v-for="(item, index) in answerData['6'].data">
<li @click="go(item.id)" :data-id="item.id" :key="index" :class="item.answer == undefined ? 'active3' : item.is_right ? 'active1' : 'active2'">{{ item.num }}</li>
</template>
</ul>
</template>
<template v-if="answerData['6'].data.length !=0">
<div class="title" >{{ answerData['6'].title }}</div>
<template v-if="answerData['5'].data.length !=0">
<div class="title" >{{ answerData['5'].title }}</div>
<ul>
<template v-for="(item, index) in answerData['6'].data">
<template v-for="(item, index) in answerData['5'].data">
<li @click="go(item.id)" :data-id="item.id" :key="index" :class="item.answer == undefined ? 'active3' : item.is_right ? 'active1' : 'active2'">{{ item.num }}</li>
</template>
</ul>
......
......@@ -192,6 +192,9 @@ export default {
if (this.activeIndex === _this.questionsData.sheet.question_count - 1) {
_this.swiperSign = _this.questionsData.sheet.question_count - 1
}
if (this.activeIndex === _this.questionsData.sheet.question_count) {
_this.requestData.answerPage = _this.questionsData.sheet.question_count - 1
}
}
}
},
......@@ -234,6 +237,7 @@ export default {
beforeDestroy() {
clearInterval(this.initTime)
clearInterval(this.clockCount)
this.examSubmit(0)
},
mounted () {
const body = document.querySelector('body')
......@@ -345,11 +349,12 @@ export default {
document.getElementById('bottom-view').scrollTop = 0
this.swiper.slideTo(i, 0, false)
this.topicCard.isShow = false
setTimeout(() => {
this.requestData.answerPage = this.swiper.activeIndex
this.currentNum = this.swiper.activeIndex + 1
this.currentNum === this.questionsData.sheet.question_count
? this.nextBtnShow = false
: this.nextBtnShow = true
setTimeout(() => {
this.currentNum = this.swiper.activeIndex + 1
}, 100)
this.getIsSign()
}, 200)
......@@ -357,6 +362,7 @@ export default {
}
},
showCard() {
this.requestData.answerPage = this.swiper.activeIndex
this.clickStatus = Date.parse(new Date())
if (this.swiper.activeIndex !== this.questionsData.sheet.question_count) {
this.swiperSign = this.swiper.activeIndex
......@@ -597,12 +603,13 @@ export default {
}, 100)
this.currentNum === this.questionsData.sheet.question_count ? this.nextBtnShow = false : this.nextBtnShow = true
if (res.answers !== null) {
if (res.answers.answerPage !== undefined && this.$route.query.id === undefined && res.answers.answerPage !== this.questionsData.sheet.question_count) {
// if (res.answers.answerPage !== undefined && this.$route.query.id === undefined && res.answers.answerPage !== this.questionsData.sheet.question_count) {
setTimeout(() => {
this.currentNum = res.answers.answerPage + 1
this.swiper.slideTo(res.answers.answerPage, 0, false)
this.currentNum === this.questionsData.sheet.question_count ? this.nextBtnShow = false : this.nextBtnShow = true
}, 100)
}
// }
const datas = res.answers
if (datas.length === 0) {
this.requestData = {}
......
......@@ -16,7 +16,7 @@
</li>
</ul>
<div class="code">
<div class="txt">想了解更多,扫码关注我们</div>
<div class="txt">想了解更多,保存二维码图片,扫码关注我们</div>
<img @click="imagePreview" src="https://zws-imgs-pub.ezijing.com/static/public/d720ec7c4eed91788de652fb7962a911.png" alt="">
</div>
</div>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论