东西湖大屏
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

  1. <template>
  2. <div class="video-box">
  3. <video width="100%" height="100%" controls loop autoplay muted :poster="poster">
  4. <source :src="src" type="video/mp4">
  5. </video>
  6. </div>
  7. </template>
  8. <script>
  9. import { FetchShowFileList } from '@/api/library'
  10. export default {
  11. name: 'Video',
  12. components: {
  13. },
  14. data() {
  15. return {
  16. poster: 'https://qiniu.aiyxlib.com/1658104787005.jpg',
  17. src: ''
  18. }
  19. },
  20. created() {
  21. this.getShowFile()
  22. },
  23. mounted() {
  24. },
  25. methods: {
  26. getShowFile() {
  27. const params = {
  28. libcode: 'FTZN'
  29. }
  30. FetchShowFileList(params).then(res => {
  31. if (res.errCode === 0) {
  32. this.src = res.data[0].filePath
  33. } else {
  34. this.$message.error('接口错误')
  35. }
  36. })
  37. }
  38. }
  39. }
  40. </script>
  41. <style lang="scss">
  42. @import "~@/assets/styles/index.scss";
  43. </style>