You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
867 B
45 lines
867 B
<template>
|
|
<div class="video-box">
|
|
<video width="100%" height="100%" controls loop autoplay muted :poster="poster">
|
|
<source :src="src" type="video/mp4">
|
|
</video>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { FetchShowFileList } from '@/api/library'
|
|
export default {
|
|
name: 'Video',
|
|
components: {
|
|
},
|
|
data() {
|
|
return {
|
|
poster: 'https://qiniu.aiyxlib.com/1658104787005.jpg',
|
|
src: ''
|
|
}
|
|
},
|
|
created() {
|
|
this.getShowFile()
|
|
},
|
|
mounted() {
|
|
},
|
|
methods: {
|
|
getShowFile() {
|
|
const params = {
|
|
libcode: 'FTZN'
|
|
}
|
|
FetchShowFileList(params).then(res => {
|
|
if (res.errCode === 0) {
|
|
this.src = res.data[0].filePath
|
|
} else {
|
|
this.$message.error('接口错误')
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
@import "~@/assets/styles/index.scss";
|
|
</style>
|