|
@@ -13,10 +13,10 @@
|
|
<div
|
|
<div
|
|
class="content"
|
|
class="content"
|
|
v-if="fixIcon.length > 0"
|
|
v-if="fixIcon.length > 0"
|
|
- :style="{ height: isMobile ? '100%' : '80%' }"
|
|
|
|
|
|
+ :class="{ isMobileCon: isMobile }"
|
|
>
|
|
>
|
|
<div
|
|
<div
|
|
- v-if="!isMobile"
|
|
|
|
|
|
+ v-if="!isMobile && lengthShow"
|
|
@click="slideto('slidePrev')"
|
|
@click="slideto('slidePrev')"
|
|
class="swiper-button-prev"
|
|
class="swiper-button-prev"
|
|
></div>
|
|
></div>
|
|
@@ -48,10 +48,14 @@
|
|
></iframe>
|
|
></iframe>
|
|
</div>
|
|
</div>
|
|
</swiper-slide>
|
|
</swiper-slide>
|
|
- <div class="swiper-pagination" slot="pagination"></div>
|
|
|
|
|
|
+ <div
|
|
|
|
+ class="swiper-pagination"
|
|
|
|
+ slot="pagination"
|
|
|
|
+ v-show="lengthShow"
|
|
|
|
+ ></div>
|
|
</swiper>
|
|
</swiper>
|
|
<div
|
|
<div
|
|
- v-if="!isMobile"
|
|
|
|
|
|
+ v-if="!isMobile && lengthShow"
|
|
@click="slideto('slideNext')"
|
|
@click="slideto('slideNext')"
|
|
class="swiper-button-next"
|
|
class="swiper-button-next"
|
|
></div>
|
|
></div>
|
|
@@ -104,7 +108,9 @@ export default {
|
|
name: "Home",
|
|
name: "Home",
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- loadAuto: false,
|
|
|
|
|
|
+ lengthShow: false,
|
|
|
|
+ // 看看是不是只有一张图,一个视频或irm,只有一张图的时候隐藏左右按钮和小圆点
|
|
|
|
+ // loadAuto: false,
|
|
audio: "",
|
|
audio: "",
|
|
m: this.$route.query.m,
|
|
m: this.$route.query.m,
|
|
id: this.$route.query.id,
|
|
id: this.$route.query.id,
|
|
@@ -133,6 +139,11 @@ export default {
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
active(newVal) {
|
|
active(newVal) {
|
|
|
|
+ // 判断是否只有一张图片或者视频,ifrm lengthShow
|
|
|
|
+ let tempType = this.data[newVal];
|
|
|
|
+ console.log(tempType);
|
|
|
|
+ if (tempType && tempType.length && tempType.length > 1) this.lengthShow = true;
|
|
|
|
+ else this.lengthShow = false;
|
|
if (!newVal) {
|
|
if (!newVal) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -165,8 +176,8 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 音频播放完毕
|
|
// 音频播放完毕
|
|
- overAudio(){
|
|
|
|
- console.log('播放声音完毕');
|
|
|
|
|
|
+ overAudio() {
|
|
|
|
+ console.log("播放声音完毕");
|
|
this.audioAc(false);
|
|
this.audioAc(false);
|
|
},
|
|
},
|
|
// 音频的状态
|
|
// 音频的状态
|
|
@@ -318,6 +329,9 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .isMobileCon {
|
|
|
|
+ height: calc(100vh - 90px);
|
|
|
|
+ }
|
|
|
|
|
|
.iconarr {
|
|
.iconarr {
|
|
list-style: none;
|
|
list-style: none;
|
|
@@ -411,7 +425,7 @@ export default {
|
|
}
|
|
}
|
|
iframe {
|
|
iframe {
|
|
width: 100%;
|
|
width: 100%;
|
|
- height: 100vh;
|
|
|
|
|
|
+ height: calc(100vh - 90px);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -448,7 +462,7 @@ export default {
|
|
iframe {
|
|
iframe {
|
|
width: 100%;
|
|
width: 100%;
|
|
max-width: unset;
|
|
max-width: unset;
|
|
- height: 100vh;
|
|
|
|
|
|
+ height: calc(100vh - 90px);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|