From c93364cc72455ad76829bde94e0e3924972fd37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E5=8F=ABMT?= <18253750314@163.com> Date: Fri, 12 Jan 2024 00:05:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/swiperHor/index.vue | 70 +++++++++++++++++++----------- src/views/aigc/index.vue | 2 + 2 files changed, 47 insertions(+), 25 deletions(-) diff --git a/src/components/swiperHor/index.vue b/src/components/swiperHor/index.vue index 8ccb1a4..7b52fa3 100644 --- a/src/components/swiperHor/index.vue +++ b/src/components/swiperHor/index.vue @@ -5,7 +5,7 @@
- + 进入直播间
主播: {{ item.name }} @@ -13,9 +13,11 @@
- + +
@@ -64,6 +66,17 @@ export default { // autoplay: 3000, loop: true }) + }, + videoPlayer (value, play) { + const id = document.getElementById(value) + const playid = document.getElementById(play) + if (id.paused) { + id.play() + playid.style.display = 'none' + } else { + id.pause() + playid.style.display = 'block' + } } } } @@ -96,7 +109,7 @@ export default { .swiper-slide { width: 230px; margin-right: 20px; - img { + .swiperimg { width: 230px; display: block; } @@ -136,7 +149,14 @@ export default { float: left; margin-right: 20px; position: relative; - img { + .play { + position: absolute; + margin: 0 auto; + top: 50%; + margin-left: 40%; + margin-top: -60px; + } + video { width: 230px; } .textzb { @@ -154,29 +174,29 @@ export default { line-height: 30px; } .contentzb{ - margin-top: 10px; - width: 207px; - font-size: 18px; - font-weight: 400; - color: #030303; - line-height: 24px; + margin-top: 10px; + width: 207px; + font-size: 18px; + font-weight: 400; + color: #030303; + line-height: 24px; } } } - .videozb::after { - content: ''; - z-index: 99; - width: 55px; - height: 55px; - position: absolute; - background-image: url('../../assets/play.png'); - background-size: 100%; - left: 50%; - margin-left: -27.5px; - top: 200px; - z-index: 99; - background-repeat: no-repeat; - } + // .videozb::after { + // content: ''; + // z-index: 99; + // width: 55px; + // height: 55px; + // position: absolute; + // background-image: url('../../assets/play.png'); + // background-size: 100%; + // left: 50%; + // margin-left: -27.5px; + // top: 200px; + // z-index: 99; + // background-repeat: no-repeat; + // } } diff --git a/src/views/aigc/index.vue b/src/views/aigc/index.vue index e65a5a3..9e7474e 100644 --- a/src/views/aigc/index.vue +++ b/src/views/aigc/index.vue @@ -183,7 +183,9 @@ export default { const { data: { message, data } } = await videoList() if (message === 'success') { for (const iter of data.list) { + console.log(iter, '111111') this.aigcsp.push({ + video: iter.link ? iter.link : '', img: iter.image.split('?')[0], name: iter.subTitle ? iter.subTitle : '主播名', content: iter.title,