feat: banner移动端

This commit is contained in:
2026-03-16 16:36:37 +08:00
parent fd352cac18
commit f2c265e4e7
3 changed files with 133 additions and 132 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -1,8 +1,5 @@
<template> <template>
<div <div class="award-page" :class="{ 'is-zh': isZh }">
class="award-page"
:class="{ 'is-zh': isZh }"
>
<div class="banner"> <div class="banner">
<video <video
:src="bannerUrl" :src="bannerUrl"
@@ -14,16 +11,9 @@
webkit-playsinline webkit-playsinline
x5-playsinline x5-playsinline
></video> ></video>
<div <div class="submit-btn flex flex-center" @click="handleSubmitApplication">
class="submit-btn flex flex-center"
@click="handleSubmitApplication"
>
<div>{{ $t('AwardsPage.submitApplication') }}</div> <div>{{ $t('AwardsPage.submitApplication') }}</div>
<img <img src="@/assets/images/award/arrow_right.png" alt="" class="arrow" />
src="@/assets/images/award/arrow_right.png"
alt=""
class="arrow"
/>
<div class="ddl">{{ $t('AwardsPage.applicationDeadline') }}</div> <div class="ddl">{{ $t('AwardsPage.applicationDeadline') }}</div>
</div> </div>
</div> </div>
@@ -49,10 +39,12 @@
import TimeLine from './components/TimeLine.vue' import TimeLine from './components/TimeLine.vue'
import Bloom from './components/Bloom.vue' import Bloom from './components/Bloom.vue'
import Slogan from './components/Slogan.vue' import Slogan from './components/Slogan.vue'
import banner from '@/assets/images/award/banner.mp4' import banner from '@/assets/images/award/banner.mp4'
import bannerMobile from '@/assets/images/award/banner_mobile.mp4'
import bannerZh from '@/assets/images/award/banner_chinese.mp4' import bannerZh from '@/assets/images/award/banner_chinese.mp4'
import bannerZhMobile from '@/assets/images/award/banner_mobile_chinese.mp4'
import { useIsMobile } from '@/utils/isMobile'
const { isMobile } = useIsMobile()
const router = useRouter() const router = useRouter()
const { locale } = useI18n() const { locale } = useI18n()
@@ -65,7 +57,11 @@
}) })
const bannerUrl = computed(() => { const bannerUrl = computed(() => {
if (isMobile.value) {
return isZh.value ? bannerZhMobile : bannerMobile
} else {
return isZh.value ? bannerZh : banner return isZh.value ? bannerZh : banner
}
}) })
const handleSubmitApplication = () => { const handleSubmitApplication = () => {
@@ -78,10 +74,6 @@
height: 97rem; height: 97rem;
} }
.logo {
width: 2.4rem;
height: 2.4rem;
}
.banner { .banner {
height: 100rem; height: 100rem;
// background: url('@/assets/images/award/banner.png') no-repeat; // background: url('@/assets/images/award/banner.png') no-repeat;
@@ -144,4 +136,13 @@
} }
} }
} }
@media screen and (max-width: 1200px) {
.banner {
height: 123.4rem;
.submit-btn {
bottom: 57rem;
left: 6.6rem;
}
}
}
</style> </style>