提交 83ac2bd9 authored 作者: lihuihui's avatar lihuihui

错题删除修改

上级 71a9d294
......@@ -2,6 +2,7 @@
<div>
<div class="exam-box">
<div class="topic-box">
<van-empty description="暂无内容" v-if="isEmpty"/>
<swiper ref="mySwiper" :options="swiperOptions">
<template v-for="(item, index) in questionData.list">
<swiper-slide :key="index" :data-id="item.question_id">
......@@ -172,7 +173,7 @@
</template>
</swiper>
</div>
<template>
<template v-if="!isEmpty">
<div class="btn-box" id="bottom-view">
<div :class="$route.query.type == 2 ? 'padd new' : 'padd'">
<div class="ysc" v-if="$route.query.type == 2">已收藏</div>
......@@ -218,6 +219,7 @@ export default {
data() {
const _this = this
return {
isEmpty: false,
storageCheckOption: [],
cacheOption: [],
isBtnShow: {
......@@ -386,15 +388,20 @@ export default {
if (res.code === 0) {
const isNext = this.questionData.list[this.questionData.list.findIndex(item => { return item.question_id === ids }) + 1]
isNext === undefined ? this.swiper.slidePrev() : this.swiper.slideNext()
this.$router.replace({
path: '/my/questionsDetails',
query: {
id: this.swiper.slides[this.swiper.activeIndex].attributes['data-id'].nodeValue,
page: this.$route.query.page,
type: this.$route.query.type,
questionType: this.$route.query.questionType
}
})
if (this.swiper.slides.length !== 1) {
this.$router.replace({
path: '/my/questionsDetails',
query: {
id: this.swiper.slides[this.swiper.activeIndex].attributes['data-id'].nodeValue,
page: this.$route.query.page,
type: this.$route.query.type,
questionType: this.$route.query.questionType
}
})
} else {
this.isEmpty = true
this.swiper.slides.remove()
}
}
})
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论