|
@@ -37,14 +37,19 @@
|
|
|
></div>
|
|
|
<div
|
|
|
v-if="switchPdf.pdf"
|
|
|
- :class="!switchBox ? 'smallBox' : 'switchPdf'"
|
|
|
+ :class="!switchBox ? 'smallBox overStyle' : 'switchPdf'"
|
|
|
:style="!switchBox && hideBox ? 'display:none;' : ''"
|
|
|
>
|
|
|
- <div v-if="switchPdf.pdf && switchPdf.pdf > 0">
|
|
|
+ <div
|
|
|
+ v-if="switchPdf.pdf && switchPdf.pdf > 0"
|
|
|
+ v-infinite-scroll="loadscroll"
|
|
|
+ :infinite-scroll-delay="200"
|
|
|
+ :infinite-scroll-distance="50"
|
|
|
+ >
|
|
|
<pdf
|
|
|
class="iframe"
|
|
|
:src="$tools.splitImgHost(switchPdf.url)"
|
|
|
- v-for="i in switchPdf.pdf"
|
|
|
+ v-for="i in counts"
|
|
|
:key="i"
|
|
|
:page="i"
|
|
|
ref="pdf"
|
|
@@ -1252,7 +1257,8 @@ export default {
|
|
|
switchPdf: {}, //pdf数据
|
|
|
liveDuration: 0,
|
|
|
numPages: 0,
|
|
|
- loadingPage: 0, //当前加载pdf页面数量
|
|
|
+ // loadingPage: 0, //当前加载pdf页面数量
|
|
|
+ counts: 0,
|
|
|
showPdf: false,
|
|
|
// 总页数
|
|
|
pdfPages: 10,
|
|
@@ -1704,23 +1710,39 @@ export default {
|
|
|
methods: {
|
|
|
...mapMutations(["getCartCount"]),
|
|
|
...mapActions(["getUserInfo"]),
|
|
|
- switchBoxFunc() {
|
|
|
- if (this.loadingPage === this.switchPdf.pdf) {
|
|
|
- this.switchBox = !this.switchBox
|
|
|
+ loadscroll() {
|
|
|
+ if(!this.counts && this.switchPdf.pdf){
|
|
|
+ if(this.switchPdf.pdf >= 4){
|
|
|
+ this.counts = 4
|
|
|
+ }else{
|
|
|
+ this.counts = this.switchPdf.pdf
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.counts < this.switchPdf.pdf) {
|
|
|
+ this.counts++
|
|
|
} else {
|
|
|
- this.$message.warning("PDF加载中,请耐心等待");
|
|
|
return;
|
|
|
}
|
|
|
},
|
|
|
+ switchBoxFunc() {
|
|
|
+ // if (this.loadingPage === this.switchPdf.pdf) {
|
|
|
+ this.switchBox = !this.switchBox;
|
|
|
+ // } else {
|
|
|
+ // this.$message.warning("PDF加载中,请耐心等待");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ },
|
|
|
pageLoaded(e) {
|
|
|
- console.log("pdf页面总数:", this.switchPdf.pdf,"当前已加载总数:", e);
|
|
|
- if(this.switchPdf.pdf === e){
|
|
|
- this.$message.success("PDF加载完毕,如出现PDF模糊问题,请尝试重新切换");
|
|
|
- this.loadingPage = e;
|
|
|
+ console.log("pdf页面总数:", this.switchPdf.pdf, "当前已加载总数:", e);
|
|
|
+ if (this.switchPdf.pdf === e) {
|
|
|
+ this.$message.success("PDF已全部加载,如出现模糊问题,请尝试重新切换");
|
|
|
+ // this.loadingPage = e;
|
|
|
}
|
|
|
},
|
|
|
backSwitchPdfData(item) {
|
|
|
+ this.counts = 0
|
|
|
this.switchPdf = item;
|
|
|
+ this.loadscroll()
|
|
|
},
|
|
|
pauseVideo() {
|
|
|
let _p = this.player;
|
|
@@ -4922,6 +4944,9 @@ export default {
|
|
|
transform: scale(0.2);
|
|
|
}
|
|
|
}
|
|
|
+ .overStyle{
|
|
|
+ overflow: auto!important;
|
|
|
+ }
|
|
|
.switch {
|
|
|
position: absolute;
|
|
|
right: 22px;
|
|
@@ -4960,6 +4985,7 @@ export default {
|
|
|
width: 810px;
|
|
|
height: 455px;
|
|
|
overflow: auto;
|
|
|
+ border: 1px solid #666;
|
|
|
}
|
|
|
.video {
|
|
|
width: 100%;
|