48 lines
1.1 KiB
Vue
48 lines
1.1 KiB
Vue
<template>
|
|
<div class="Poster-main op0" data-animation="animate__animated animate__fadeIn animate__slow">
|
|
|
|
<div class="Poster-container" :style="posterStyle">
|
|
<img class="Poster-img" :src="posterInfo.imgSrc" alt="">
|
|
<div class="Poster-content-box">
|
|
<div class="Poster-title">{{ props.title }}</div>
|
|
<div class="Poster-text">{{ props.text }}</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
const { t, locale } = useI18n()
|
|
|
|
|
|
const props = defineProps({
|
|
type: Number,
|
|
title: String,
|
|
text: String,
|
|
})
|
|
|
|
const initState = {
|
|
imgSrc: '/img/product_list/banner2.jpg',
|
|
title: '',
|
|
text: ''
|
|
}
|
|
let posterInfo = ref({ ...initState })
|
|
let posterStyle = {
|
|
height: '23vw',
|
|
}
|
|
|
|
// 获取海报
|
|
// useFetch('/api/poster/getPoster', { params: { poster_location: props.type, locale: locale.value } }).then(res => {
|
|
// const data = JSON.parse(res.data.value).data
|
|
// posterInfo.value = data || { ...initState }
|
|
|
|
// setTimeout(() => {
|
|
// htmlAddAnimations()
|
|
// });
|
|
// })
|
|
|
|
</script>
|
|
|
|
<style scoped src="~/assets/css/poster/index.scss"></style>
|
|
<style scoped src="~/assets/css/poster/media.scss"></style> |