Commit 2545238a by zhangmengjie

23.4.12

parent c197b7bd
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<el-dialog :title='title' :visible.sync="dialogVisibl" width="30%" :before-close="dialog" center> <el-dialog :title='title' :visible.sync="dialogVisibl" width="30%" :before-close="dialog" center>
<div v-if="control != 4"> <div v-if="control != 4">
<!-- 图片说明 --> <!-- 图片说明 -->
<el-image v-if="control == '1'" style="width:100%; " :src="idt" > <el-image v-if="control == '1'" style="width:100%;height: 300px; " :src="idt" >
</el-image> </el-image>
<!-- 视频说明 --> <!-- 视频说明 -->
<comvideo v-if="control == '2'" :videoUrl="idt"></comvideo> <comvideo v-if="control == '2'" :videoUrl="idt"></comvideo>
<!-- 语音说明 --> <!-- 语音说明 -->
<audio v-if="control == '3'" controls ref="audio" class="aud"> <audio v-if="control == '3'" controls ref="audio" class="aud">
<source :src="idt" /> <source :src="idt" />
...@@ -68,7 +68,8 @@ export default { ...@@ -68,7 +68,8 @@ export default {
name: '', name: '',
money:'' money:''
}, },
title: '' title: '',
id:''
}; };
}, },
watch: { watch: {
...@@ -101,6 +102,11 @@ export default { ...@@ -101,6 +102,11 @@ export default {
} }
} }
}, },
idt(val,old){
this.$nextTick(() => {
this.$refs.audio.src = val;
});
},
bindex(st, old) { bindex(st, old) {
console.log(st, old,this.idt, '000000000000') console.log(st, old,this.idt, '000000000000')
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<span>图片说明</span> <span>图片说明</span>
<div style="display: flex;"> <div style="display: flex;">
<div class="imgdiv" v-for="v in particulars.pictureList"> <div class="imgdiv" v-for="v in particulars.pictureList">
<el-image class="imgdiv-img" :src="v.url"> <el-image class="imgdiv-img" style="margin: 5px;" :src="v.url" :preview-src-list="srcList">
</el-image> </el-image>
</div> </div>
</div> </div>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<div class="description"> <div class="description">
<span>视频说明</span> <span>视频说明</span>
<div class="imgdiv"> <div class="imgdiv">
<comvideo :width="width" :videoUrl="particulars.video"></comvideo> <comvideo :width="width" :videoUrl="video"></comvideo>
</div> </div>
</div> </div>
<div class="description"> <div class="description">
...@@ -85,12 +85,9 @@ export default { ...@@ -85,12 +85,9 @@ export default {
}, },
data() { data() {
return { return {
width: '30%', width: '200',
url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg', url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
// srcList: [ srcList: [],
// 'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
// 'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'
// ],
value1: '', value1: '',
form: { form: {
name: '', name: '',
...@@ -102,6 +99,7 @@ export default { ...@@ -102,6 +99,7 @@ export default {
resource: '', resource: '',
desc: '' desc: ''
}, },
video:'',
particulars: { particulars: {
video: '', video: '',
voice: '' voice: ''
...@@ -117,7 +115,8 @@ export default { ...@@ -117,7 +115,8 @@ export default {
if (res.code == 200) { if (res.code == 200) {
this.$nextTick(() => { this.$nextTick(() => {
if (res.data.videoList != null) { if (res.data.videoList != null) {
self.particulars.video = res.data.videoList[0].url self.video = res.data.videoList[0].url
console.log(self.particulars.video,'self.particulars.video')
} else { } else {
self.particulars.video = '' self.particulars.video = ''
} }
...@@ -132,6 +131,9 @@ export default { ...@@ -132,6 +131,9 @@ export default {
res.data.repairTime = res.data.repairTime.slice(0, 10) res.data.repairTime = res.data.repairTime.slice(0, 10)
} }
self.particulars = res.data self.particulars = res.data
self.particulars.pictureList.forEach((item)=>{
self.srcList.push(item.url)
})
}) })
console.log(this.idt,'itd===========') console.log(this.idt,'itd===========')
} }
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
:src="videoUrl" :src="videoUrl"
:poster="videoCover" :poster="videoCover"
:width="width" :width="width"
:height="height"
:autoplay="autoplay" :autoplay="autoplay"
:controls="!originPlay&&controls" :controls="!originPlay&&controls"
:loop="loop" :loop="loop"
...@@ -32,10 +33,10 @@ ...@@ -32,10 +33,10 @@
type: String, type: String,
default: '100%' default: '100%'
}, },
// height: { // 视频播放器高度 height: { // 视频播放器高度
// type: Number, type: Number,
// default: 150 default: 300
// }, },
/* /*
由于目前在最新版的Chrome浏览器(以及所有以Chromium为内核的浏览器)中, 由于目前在最新版的Chrome浏览器(以及所有以Chromium为内核的浏览器)中,
已不再允许自动播放音频和视频。就算你为video或audio标签设置了autoplay 已不再允许自动播放音频和视频。就算你为video或audio标签设置了autoplay
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment