0911 第一版
This commit is contained in:
134
src/components/SynthesizedResults.vue
Normal file
134
src/components/SynthesizedResults.vue
Normal file
@@ -0,0 +1,134 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from "vue"
|
||||
import { useRouter } from 'vue-router'
|
||||
import Popup from './Popup.vue'
|
||||
import { globalStore } from "../globalstore.js";
|
||||
import globalToastEvent, { ToastType } from '../globalToastEvent';
|
||||
|
||||
defineProps({
|
||||
show: true
|
||||
})
|
||||
|
||||
|
||||
const isPopupVisible = ref(false);
|
||||
|
||||
|
||||
const chartsBattle = ()=> {
|
||||
globalStore.chartsBattle = true;
|
||||
isPopupVisible.value = true;
|
||||
}
|
||||
|
||||
const router = useRouter();
|
||||
const navigateToHome = () => {
|
||||
router.push({
|
||||
name: 'home'
|
||||
})
|
||||
}
|
||||
|
||||
const handleLottery = () => {
|
||||
globalToastEvent.emit(ToastType.SHOW_LOTTERY)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div class="home-wrapper">
|
||||
<div class="scene-item item-1">
|
||||
<img src="../assets/images/go-home-btn.png" @click="navigateToHome" alt="回到首页">
|
||||
</div>
|
||||
|
||||
<div class="mask-background mask-image" :style="{ backgroundImage: `url(${globalStore.result_url})` }">
|
||||
</div>
|
||||
<img src="../assets/images/mengban-border.png" class="mengban-border" alt="蒙版">
|
||||
|
||||
<div class="scene-item item-2">
|
||||
<img src="../assets/images/charts-battle.png" @click="chartsBattle" alt="参与打榜">
|
||||
</div>
|
||||
|
||||
<div class="scene-item item-3" @click="handleLottery">
|
||||
<img src="../assets/images/instant-win.png" alt="立即抽奖">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Popup v-model:show="isPopupVisible" />
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.mengban-border {
|
||||
width: 85vw;
|
||||
position: absolute;
|
||||
top: 13%;
|
||||
}
|
||||
.mask-background {
|
||||
-webkit-mask-image: url("../assets/images/mengban.png");
|
||||
mask-image: url("../assets/images/mengban.png");
|
||||
-webkit-mask-size: contain;
|
||||
mask-size: contain;
|
||||
-webkit-mask-position: center;
|
||||
mask-position: center;
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
mask-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mask-image {
|
||||
/* background-image: url("../assets/images/haibao-bg.webp"); */
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
position: relative;
|
||||
width: 100vw;
|
||||
height: 60vh;
|
||||
}
|
||||
.home-wrapper {
|
||||
width: 100%;
|
||||
height: 92vh;
|
||||
background-image: url('../assets/images/img-result-bg.png');
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
min-height: -webkit-fill-available;
|
||||
}
|
||||
|
||||
.scene-item {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
transition: all 0.4s ease;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
border: 3px solid transparent;
|
||||
animation: float 4s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.scene-item:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.scene-item img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.item-1 {
|
||||
width: 16vw;
|
||||
top: 6.7%;
|
||||
left: 5%;
|
||||
animation-delay: 0s;
|
||||
}
|
||||
.item-2 {
|
||||
width: 45vw;
|
||||
bottom: 3%;
|
||||
left: 5%;
|
||||
}
|
||||
.item-3 {
|
||||
width: 45vw;
|
||||
bottom: 3%;
|
||||
right: 5%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user