fix: 修复单页 pdf 无法点击本人已阅读按钮

This commit is contained in:
2025-09-24 14:32:19 +08:00
parent dd1ce78a4b
commit e92c8cc095

View File

@@ -14,6 +14,7 @@
</van-notice-bar>
<div id="pdf" style="overflow: scroll;background: #eee;" :style="[{height:isPreview ? '100vh' : '75vh'}]" @scroll="handleScroll">
<div id="pdfH5ID"></div>
<div ref="activeButtonEle"></div>
<!-- 银保渠道右侧标注提示 -->
<div v-if='branchType == "14" && !isScrollToBottom' class='scroll-tip'>
请下滑至底部完成阅读
@@ -71,7 +72,8 @@
branchType: '',
// 银保渠道滚动检测相关
isScrollToBottom: false,
scrollTimer: null
scrollTimer: null,
pdfStatus: void 0
}
},
components: {
@@ -368,7 +370,8 @@
pdfurl: thispdfurl,
lazy:false,
scale:1
}).on("complete", function (status, msg, time) { //监听完成事件
}).on("complete", (status, msg, time)=> { //监听完成事件
this.pdfStatus = status
console.log("状态:" + status + ",信息:" + msg + ",耗时:" + time + "毫秒,总页数:" + this.totalNum)
})
},
@@ -484,7 +487,16 @@
that.isDisabledComplite = true
}
}
}
},
pdfStatus() {
const observer = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (entry.isIntersecting) this.isScrollToBottom = true
observer.unobserve(entry.target)
})
})
observer.observe(this.$refs.activeButtonEle)
}
}
}
</script>