Commit 77df3bd2 by 胡悦

feat(aiVideo): 重构视频播放页面布局并更新样式

- 将单视频布局改为左右分栏,左侧添加装饰图片,右侧为视频播放区
- 为视频容器添加边框、阴影和四角装饰元素,增强视觉效果
- 更新播放/暂停按钮样式,添加悬停动画效果
- 替换视频源地址为新的资源路径
- 新增左右两侧PNG图片资源文件
1 parent b64851fb
<template>
<div class="video-container">
<video controls class="video-box" ref="video">
<source :src="videoSrc" type="video/mp4" />
</video>
<div class="video-pause" @click="hanldPlay('pause')" v-if="status == 'play'">
<img src="@/assets/images/play-icon.png" />
<div class="ai-video-container">
<!-- 左侧图片 -->
<div class="left-image">
<img src="@/assets/images/left.png" alt="left" class="left-img" />
</div>
<!-- 右侧视频区 -->
<div class="right-content">
<div class="video-frame">
<div class="video-container">
<video controls class="video-box" ref="video">
<source :src="videoSrc" type="video/mp4" />
</video>
<div class="video-pause" @click="hanldPlay('pause')" v-if="status == 'play'">
<img src="@/assets/images/play-icon.png" />
</div>
<div class="video-play" @click="hanldPlay('play')" v-if="status == 'pause'">
<img src="@/assets/images/pause-icon.png" />
</div>
</div>
<!-- 四角装饰 -->
<div class="corner corner-tl"></div>
<div class="corner corner-tr"></div>
<div class="corner corner-bl"></div>
<div class="corner corner-br"></div>
</div>
</div>
<div class="video-play" @click="hanldPlay('play')" v-if="status == 'pause'"><img src="@/assets/images/pause-icon.png" /></div>
</div>
</template>
......@@ -16,7 +35,7 @@ export default {
data() {
return {
videoSrc: 'https://img02.glsx.com.cn/weapp/resource/saas/video/video_20260311.mp4',
videoSrc: 'https://img02.glsx.com.cn/weapp/resource/shuke/video/video.mp4',
status: 'play',
timer: null
}
......@@ -85,47 +104,121 @@ export default {
</script>
<style lang="scss" scoped>
.video-container {
width: 1824px;
height: 876px;
background: url('../../assets/images/home-bg.png') no-repeat;
background-size: 100%;
// border: 4px solid rgba(18, 117, 248, 0.5);
.ai-video-container {
width: 100%;
box-sizing: border-box;
// margin: 20px calc((100vw - 1560px) / 2);
margin: 20px auto;
position: relative;
display: flex;
justify-content: center;
padding: 40px 60px;
gap: 40px;
}
.left-image {
width: 893px;
height: 752px;
display: flex;
flex-direction: column;
}
.right-content {
width: 1112px;
height: 658px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
}
.video-frame {
position: relative;
width: 100%;
height: 100%;
}
.video-container {
width: 100%;
height: 100%;
position: relative;
border-radius: 8px;
overflow: hidden;
background: rgba(0, 0, 0, 0.5);
border: 1px solid rgba(0, 184, 255, 0.3);
box-shadow: 0 0 40px rgba(0, 184, 255, 0.2);
.video-box {
width: 1440px;
height: 810px;
width: 100%;
height: 100%;
object-fit: cover;
}
.video-pause,
.video-play {
position: absolute;
top: 50%;
left: 50%;
width: 120px;
height: 120px;
margin-left: -60px;
margin-top: -60px;
transform: translate(-50%, -50%);
width: 80px;
height: 80px;
border-radius: 50%;
background: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.3s ease;
&:hover {
transform: translate(-50%, -50%) scale(1.1);
background: rgba(0, 184, 255, 0.6);
}
img {
width: 40px;
height: 40px;
object-fit: contain;
}
}
}
.video-full {
z-index: 999;
position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background: #000000;
.video-box {
position: absolute;
left: 324px;
width: calc(100% - 648px);
}
.corner {
position: absolute;
width: 20px;
height: 20px;
border: 3px solid #00b8ff;
box-shadow: 0 0 10px rgba(0, 184, 255, 0.5);
}
.corner-tl {
top: -2px;
left: -2px;
border-right: none;
border-bottom: none;
border-radius: 8px 0 0 0;
}
.corner-tr {
top: -2px;
right: -2px;
border-left: none;
border-bottom: none;
border-radius: 0 8px 0 0;
}
.corner-bl {
bottom: -2px;
left: -2px;
border-right: none;
border-top: none;
border-radius: 0 0 0 8px;
}
.corner-br {
bottom: -2px;
right: -2px;
border-left: none;
border-top: none;
border-radius: 0 0 8px 0;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!