|
@@ -28,6 +28,11 @@
|
|
|
v-if="data.imagesDesc && data.imagesDesc[myInd]"
|
|
|
></p>
|
|
|
</div>
|
|
|
+ <!-- 查看图片 -->
|
|
|
+ <viewer class="viewerCla" ref="viewer" :images="lookPics">
|
|
|
+ <img :src="lookPics[0]" alt="" />
|
|
|
+ </viewer>
|
|
|
+
|
|
|
<swiper
|
|
|
v-show="active !== 'title'"
|
|
|
class="warpper"
|
|
@@ -38,9 +43,9 @@
|
|
|
<div class="slide">
|
|
|
<img
|
|
|
style="cursor: pointer"
|
|
|
- v-viewer
|
|
|
v-if="active === 'images'"
|
|
|
- :src="fixUrl(item)"
|
|
|
+ v-lazy="fixUrl(item)"
|
|
|
+ @click="lookImg(fixUrl(item))"
|
|
|
alt=""
|
|
|
/>
|
|
|
<video
|
|
@@ -75,7 +80,10 @@
|
|
|
:class="{ oneChuMusic: fixIcon.length === 1 && !audio }"
|
|
|
>
|
|
|
<li
|
|
|
- :class="{ active: item.id === active || item.audioAc }"
|
|
|
+ :class="{
|
|
|
+ active: item.id === active || item.audioAc,
|
|
|
+ onlyTxt: audio && fixIcon.length === 2 && i !== 0,
|
|
|
+ }"
|
|
|
@click="changeActive(item.id, item.audioAc)"
|
|
|
v-for="(item, i) in fixIcon"
|
|
|
:key="i"
|
|
@@ -128,11 +136,12 @@ export default {
|
|
|
name: "Home",
|
|
|
data() {
|
|
|
return {
|
|
|
+ lookPics: [],
|
|
|
+
|
|
|
// 图片描述的索引
|
|
|
myInd: 0,
|
|
|
lengthShow: false,
|
|
|
// 看看是不是只有一张图,一个视频或irm,只有一张图的时候隐藏左右按钮和小圆点
|
|
|
- // loadAuto: false,
|
|
|
audio: "",
|
|
|
m: this.$route.query.m,
|
|
|
id: this.$route.query.id,
|
|
@@ -213,6 +222,12 @@ export default {
|
|
|
SwiperSlide,
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 点击查看大图
|
|
|
+ lookImg(url) {
|
|
|
+ let dom = this.$refs.viewer.$viewer;
|
|
|
+ this.lookPics = [url];
|
|
|
+ dom.show();
|
|
|
+ },
|
|
|
// 音频播放完毕
|
|
|
overAudio() {
|
|
|
console.log("播放声音完毕");
|
|
@@ -237,17 +252,6 @@ export default {
|
|
|
}
|
|
|
this.active = id;
|
|
|
},
|
|
|
- // autoplay() {
|
|
|
- // if (this.loadAuto) {
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // try {
|
|
|
- // this.$refs.musicBg.play();
|
|
|
- // this.loadAuto = true;
|
|
|
- // } catch (error) {
|
|
|
- // error;
|
|
|
- // }
|
|
|
- // },
|
|
|
async getData() {
|
|
|
// https://www.4dmodel.com/
|
|
|
let url = `https://super.4dage.com/data/${
|
|
@@ -318,6 +322,9 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
+.viewerCla img {
|
|
|
+ display: none;
|
|
|
+}
|
|
|
.audio {
|
|
|
position: fixed;
|
|
|
top: -100px;
|
|
@@ -404,6 +411,9 @@ export default {
|
|
|
opacity: 0;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
+ .onlyTxt {
|
|
|
+ display: none !important;
|
|
|
+ }
|
|
|
.intro {
|
|
|
max-height: 19vh;
|
|
|
overflow: auto;
|