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

错题删除修改

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