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

updata

上级 8cc9bc90
......@@ -157,6 +157,7 @@ export default {
_this.isAnalysis = false
_this.currentNum = this.activeIndex + 1
_this.currentNum === _this.questionsData.sheet.question_count ? _this.nextBtnShow = false : _this.nextBtnShow = true
_this.requestData.answerPage = this.activeIndex
},
slidePrevTransitionEnd: function() {
console.log(this.activeIndex, _this.questionsData.sheet.question_count - 1)
......@@ -543,6 +544,12 @@ export default {
this.cardChange(this.$route.query.id)
}, 100)
this.currentNum === this.questionsData.sheet.question_count ? this.nextBtnShow = false : this.nextBtnShow = true
if (res.answers.answerPage !== undefined) {
setTimeout(() => {
this.currentNum = res.answers.answerPage + 1
this.swiper.slideTo(res.answers.answerPage, 0, false)
}, 100)
}
if (res.answers !== null) {
const datas = res.answers
if (datas.length === 0) {
......@@ -550,7 +557,7 @@ export default {
this.requestData2 = 0
return false
}
this.requestData = res.answers
this.requestData = datas
this.requestData2 = Object.keys(datas).length
} else {
this.requestData = {}
......
......@@ -84,7 +84,7 @@ png图片,可以方便你直接应用到自己的设计作品中,我们
<div class="tit">能力自测</div>
<div class="txt">考试还未结束确定退出考试?</div>
<div class="btn_box">
<div class="btn" @click="isExamPopTo = false">看看其他</div>
<div class="btn" @click="isExamPopTo = false">退出考试</div>
<div class="btn btn2" @click="goAbilityExam(0)">继续考试</div>
</div>
</div>
......@@ -135,12 +135,16 @@ export default {
this.getCourseChapterList()
this.tabNav.navIndex = 1
} else {
if (window.localStorage.isExamEnd === 'true' || window.localStorage.isExamEnd === true) {
this.init()
}
this.tabNav.navIndex = 0
}
// this.getCourseChapterList()
this.scrollDom()
},
// beforeMount() {
// },
methods: {
courseNodeDetail(id) {
const path = `/exam/courseNode?id=${id}`
......@@ -215,16 +219,8 @@ export default {
})
},
goAbilityExam(n) {
window.localStorage.isExamEnd = true
window.localStorage.examTab = 0
// const path = `/exam/answer?type=1&is_create=${n}&papersUrl=zy/v2/examination/examination-papers`
// if (this.isWeapp) {
// const src = encodeURIComponent(`${window.location.origin}${path}`)
// wx.miniProgram.navigateTo({
// url: `/pages/web/index?src=${src}`
// })
// } else {
// this.$router.push({ path })
// }
this.$router.push({
path: '/exam/answer',
query: {
......
......@@ -111,6 +111,7 @@ export default {
this.$router.push({ name })
}
window.localStorage.examTab = 0
window.localStorage.isExamEnd = false
}
},
beforeMount() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论