|
@@ -36,10 +36,15 @@
|
|
|
<iframe v-if="index === myInd" :src="item" frameborder="0" />
|
|
<iframe v-if="index === myInd" :src="item" frameborder="0" />
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else-if="myType === 'video'">
|
|
<template v-else-if="myType === 'video'">
|
|
|
- <video ref="videos" controls :src="item.url" />
|
|
|
|
|
|
|
+ <video ref="videos" controls :src="item.url" controlslist="nodownload" />
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else-if="myType === 'img'">
|
|
<template v-else-if="myType === 'img'">
|
|
|
- <el-image :src="item" fit="contain" @click="handlePreview(index)" />
|
|
|
|
|
|
|
+ <el-image
|
|
|
|
|
+ id="protectedImage"
|
|
|
|
|
+ :src="item"
|
|
|
|
|
+ fit="contain"
|
|
|
|
|
+ @click="handlePreview(index)"
|
|
|
|
|
+ />
|
|
|
</template>
|
|
</template>
|
|
|
</template>
|
|
</template>
|
|
|
</SwiperSlide>
|
|
</SwiperSlide>
|
|
@@ -175,6 +180,10 @@
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.getData();
|
|
this.getData();
|
|
|
|
|
+
|
|
|
|
|
+ document.addEventListener('contextmenu', function (e) {
|
|
|
|
|
+ e.preventDefault();
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
async getData() {
|
|
async getData() {
|
|
@@ -222,8 +231,9 @@
|
|
|
this.data = obj;
|
|
this.data = obj;
|
|
|
|
|
|
|
|
// 当前type的值 应该为
|
|
// 当前type的值 应该为
|
|
|
- if (resData.images) this.myType = 'img';
|
|
|
|
|
- else if (resData.model) this.myType = 'model';
|
|
|
|
|
|
|
+ if (resData.images) {
|
|
|
|
|
+ this.myType = 'img';
|
|
|
|
|
+ } else if (resData.model) this.myType = 'model';
|
|
|
else if (resData.video) {
|
|
else if (resData.video) {
|
|
|
this.myType = 'video';
|
|
this.myType = 'video';
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -254,6 +264,11 @@
|
|
|
this.handleVideoPlay(this.data.video[0].url);
|
|
this.handleVideoPlay(this.data.video[0].url);
|
|
|
});
|
|
});
|
|
|
break;
|
|
break;
|
|
|
|
|
+ case 'img':
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.handleVideoPlay(this.data.video[0].url);
|
|
|
|
|
+ });
|
|
|
|
|
+ break;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|