|
|
@ -1,8 +1,9 @@ |
|
|
|
<template> |
|
|
|
<div class="video-box"> |
|
|
|
<video width="100%" height="100%" controls loop autoplay muted :poster="poster"> |
|
|
|
<video v-if="this.src.endsWith('.mp4')" width="100%" height="100%" controls loop autoplay muted :poster="poster"> |
|
|
|
<source :src="src" type="video/mp4"> |
|
|
|
</video> |
|
|
|
<img v-if="!this.src.endsWith('.mp4')" width="100%" height="100%" :src="src" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -28,9 +29,14 @@ export default { |
|
|
|
const params = { |
|
|
|
libcode: '1201' |
|
|
|
} |
|
|
|
// this.src = 'D://uploadFile/9f904de6-0f5e-498e-8e5d-b7e14ea15496.mp4'.replace('D://', 'http://127.0.0.1:8888/') |
|
|
|
|
|
|
|
FetchShowFileList(params).then(res => { |
|
|
|
if (res.errCode === 0) { |
|
|
|
this.src = res.data[0].filePath |
|
|
|
const src = res.data[0].filePath.replace('D://', 'http://172.16.0.23:8888/') |
|
|
|
this.src = src |
|
|
|
// this.src = 'D://uploadFile/11503339-b829-4357-8379-d2b49106431f.mp4'.replace('D://', 'http://127.0.0.1:8888/') |
|
|
|
// this.src = 'http://127.0.0.1:8888/uploadFile/9f904de6-0f5e-498e-8e5d-b7e14ea15496.mp4' |
|
|
|
} else { |
|
|
|
this.$message.error('接口错误') |
|
|
|
} |
|
|
|