feat: 对接各个视频数据

This commit is contained in:
zhongyidian committed 2025-12-30 19:42:47 +08:00
1 parent 6103453e32
commit 6ab98c4764
339 files changed
+17316 -1531

No files matched your search

@@ -0,0 +1,117 @@
<script lang="ts" setup>
import { ref, watch, computed } from 'vue'
import { Overlay } from '@/components/Overlay'
import { ImgButton } from '@/components/Button'
import { getBackgroundImage, getStaticImage, IMAGE_PATHS } from '@/utils'
interface Props {
visible: boolean
title: string
desc: string
images: string[]
compositionKey: '1' | '2' | '3'
}
const props = defineProps<Props>()
const emit = defineEmits<{ (e: 'close'): void }>()
const imageMap = {
'1': 'film/shooting/示意图-框架',
'2': 'film/shooting/示意图-对称',
'3': 'film/shooting/示意图-引导'
}
const getImage = computed(() => {
return getBackgroundImage(imageMap[props.compositionKey])
})
// 覆盖图映射:根据构图类型和图片索引获取对应的覆盖图
const getOverlayImage = (index: number) => {
const overlayMap: Record<string, string[]> = {
'1': ['film/shooting/05引导线构图_覆盖', 'film/shooting/06引导线构图_覆盖'], // 框架构图
'2': ['film/shooting/03对称构图_覆盖', 'film/shooting/04对称构图_覆盖'], // 对称构图
'3': ['film/shooting/01框架构图_覆盖', 'film/shooting/02框架构图_覆盖'] // 引导线构图
}
const images = overlayMap[props.compositionKey] || []
return images[index] || ''
}
// 每张图片的辅助线开关状态
const showBoxLineMap = ref<Record<number, boolean>>({})
watch(
() => props.visible,
v => {
if (v) {
showBoxLineMap.value = {}
}
}
)
const handleToggle = (index: number) => {
showBoxLineMap.value[index] = !showBoxLineMap.value[index]
}
const show = computed(() => props.visible)
</script>
<template>
<Overlay :visible="show" :clickable="false">
<div
class="relative w-[1752px] h-[932px]"
:style="{ backgroundImage: getBackgroundImage('shooting/知识卡片底板') }"
>
<div
class="absolute top-4 left-1/2 -translate-x-1/2 text-[45px] text-white font-bold tracking-[2px] drop-shadow-[2px_2px_4px_rgba(0,0,139,0.8)]"
>
{{ props.title }}
</div>
<div
class="absolute w-full h-[38px] top-32 left-1/2 -translate-x-1/2 bg-no-repeat bg-center"
:style="{ backgroundImage: getBackgroundImage('shooting/文案1') }"
></div>
<div
class="absolute w-[191px] h-[131px] top-[30px] left-[120px] bg-no-repeat bg-center"
:style="{ backgroundImage: getImage }"
></div>
<div
class="absolute top-[calc(50%-30px)] -translate-y-1/2"
v-for="(image, index) in props.images"
:key="index"
:style="{ left: index === 0 ? '15%' : '55%' }"
>
<ImgButton
class="absolute right-6 top-6 z-10"
:image="showBoxLineMap[index] ? 'shooting/辅助线开' : 'shooting/辅助线关'"
@click="handleToggle(index)"
/>
<div class="relative">
<img class="w-[560px]" :src="getStaticImage(image)" alt="" />
<div
v-if="showBoxLineMap[index]"
class="absolute inset-0 pointer-events-none w-[560px] bg-cover bg-center bg-no-repeat"
:style="{ backgroundImage: getBackgroundImage(getOverlayImage(index)) }"
></div>
</div>
</div>
<div
class="absolute w-full px-20 bottom-32 left-1/2 -translate-x-1/2 text-[#395E66] text-3xl font-bold indent-14 leading-[50px]"
>
{{ props.desc }}
</div>
<ImgButton
class="absolute right-2 top-4 translate-x-1/2 -translate-y-1/2 z-10"
:image="IMAGE_PATHS.COMPONENTS.CLOSE"
@click="emit('close')"
/>
</div>
</Overlay>
</template>
<style scoped></style>