提交 1d943992 authored 作者: lihuihui's avatar lihuihui

修改一道题收藏不了的问题

上级 bd09fba2
......@@ -177,6 +177,11 @@ export default {
observer: true,
autoHeight: true,
on: {
init() {
setTimeout(() => {
_this.setCurrentCollect()
}, 500)
},
slideChangeTransitionStart: function() {
_this.sildesHeightCount()
_this.setCurrentCollect()
......@@ -262,6 +267,9 @@ export default {
methods: {
sildesHeightCount() {
// slides高度重新赋值
if (document.getElementById('bottom-view-btn') === null) {
return false
}
const computedStyle = window.getComputedStyle(this.swiper.slides[this.swiper.activeIndex], null)
const topView = document.getElementById('top-view').clientHeight
const bottomView = document.getElementById('bottom-view-btn').clientHeight
......@@ -675,7 +683,7 @@ export default {
setTimeout(() => {
this.currentNum = res.answers.answerPage + 1
this.swiper.slideTo(res.answers.answerPage, 0, false)
this.setCurrentCollect()
// this.setCurrentCollect()
this.currentNum === this.questionsData.sheet.question_count ? this.nextBtnShow = false : this.nextBtnShow = true
}, 100)
}
......@@ -688,16 +696,16 @@ export default {
this.requestData = datas
this.requestData2 = Object.keys(datas).length
} else {
setTimeout(() => {
this.setCurrentCollect()
}, 300)
// setTimeout(() => {
// this.setCurrentCollect()
// }, 300)
this.requestData = {}
this.requestData2 = 0
}
})
},
setCurrentCollect() {
if (!this.nextBtnShow) {
if (this.swiper.activeIndex + 1 === this.swiper.slides.length) {
return false
}
const itemDid = this.swiper.slides[this.swiper.activeIndex].attributes['data-dId'].nodeValue
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论