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

updata

上级 9d5aa06e
...@@ -38,18 +38,18 @@ ...@@ -38,18 +38,18 @@
</template> </template>
</ul> </ul>
</template> </template>
<template v-if="answerData['5'].data.length !=0"> <template v-if="answerData['6'].data.length !=0">
<div class="title" >{{ answerData['5'].title }}</div> <div class="title" >{{ answerData['6'].title }}</div>
<ul> <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> <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> </template>
</ul> </ul>
</template> </template>
<template v-if="answerData['6'].data.length !=0"> <template v-if="answerData['5'].data.length !=0">
<div class="title" >{{ answerData['6'].title }}</div> <div class="title" >{{ answerData['5'].title }}</div>
<ul> <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> <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> </template>
</ul> </ul>
......
...@@ -66,18 +66,18 @@ ...@@ -66,18 +66,18 @@
</template> </template>
</ul> </ul>
</template> </template>
<template v-if="answerData['5'].data.length !=0"> <template v-if="answerData['6'].data.length !=0">
<div class="title" >{{ answerData['5'].title }}</div> <div class="title" >{{ answerData['6'].title }}</div>
<ul> <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> <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> </template>
</ul> </ul>
</template> </template>
<template v-if="answerData['6'].data.length !=0"> <template v-if="answerData['5'].data.length !=0">
<div class="title" >{{ answerData['6'].title }}</div> <div class="title" >{{ answerData['5'].title }}</div>
<ul> <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> <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> </template>
</ul> </ul>
......
...@@ -192,6 +192,9 @@ export default { ...@@ -192,6 +192,9 @@ export default {
if (this.activeIndex === _this.questionsData.sheet.question_count - 1) { if (this.activeIndex === _this.questionsData.sheet.question_count - 1) {
_this.swiperSign = _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 { ...@@ -234,6 +237,7 @@ export default {
beforeDestroy() { beforeDestroy() {
clearInterval(this.initTime) clearInterval(this.initTime)
clearInterval(this.clockCount) clearInterval(this.clockCount)
this.examSubmit(0)
}, },
mounted () { mounted () {
const body = document.querySelector('body') const body = document.querySelector('body')
...@@ -345,11 +349,12 @@ export default { ...@@ -345,11 +349,12 @@ export default {
document.getElementById('bottom-view').scrollTop = 0 document.getElementById('bottom-view').scrollTop = 0
this.swiper.slideTo(i, 0, false) this.swiper.slideTo(i, 0, false)
this.topicCard.isShow = false this.topicCard.isShow = false
this.currentNum === this.questionsData.sheet.question_count
? this.nextBtnShow = false
: this.nextBtnShow = true
setTimeout(() => { setTimeout(() => {
this.requestData.answerPage = this.swiper.activeIndex
this.currentNum = this.swiper.activeIndex + 1 this.currentNum = this.swiper.activeIndex + 1
this.currentNum === this.questionsData.sheet.question_count
? this.nextBtnShow = false
: this.nextBtnShow = true
}, 100) }, 100)
this.getIsSign() this.getIsSign()
}, 200) }, 200)
...@@ -357,6 +362,7 @@ export default { ...@@ -357,6 +362,7 @@ export default {
} }
}, },
showCard() { showCard() {
this.requestData.answerPage = this.swiper.activeIndex
this.clickStatus = Date.parse(new Date()) this.clickStatus = Date.parse(new Date())
if (this.swiper.activeIndex !== this.questionsData.sheet.question_count) { if (this.swiper.activeIndex !== this.questionsData.sheet.question_count) {
this.swiperSign = this.swiper.activeIndex this.swiperSign = this.swiper.activeIndex
...@@ -597,12 +603,13 @@ export default { ...@@ -597,12 +603,13 @@ export default {
}, 100) }, 100)
this.currentNum === this.questionsData.sheet.question_count ? this.nextBtnShow = false : this.nextBtnShow = true this.currentNum === this.questionsData.sheet.question_count ? this.nextBtnShow = false : this.nextBtnShow = true
if (res.answers !== null) { 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(() => { setTimeout(() => {
this.currentNum = res.answers.answerPage + 1 this.currentNum = res.answers.answerPage + 1
this.swiper.slideTo(res.answers.answerPage, 0, false) this.swiper.slideTo(res.answers.answerPage, 0, false)
}, 100) this.currentNum === this.questionsData.sheet.question_count ? this.nextBtnShow = false : this.nextBtnShow = true
} }, 100)
// }
const datas = res.answers const datas = res.answers
if (datas.length === 0) { if (datas.length === 0) {
this.requestData = {} this.requestData = {}
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</li> </li>
</ul> </ul>
<div class="code"> <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=""> <img @click="imagePreview" src="https://zws-imgs-pub.ezijing.com/static/public/d720ec7c4eed91788de652fb7962a911.png" alt="">
</div> </div>
</div> </div>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论