update
This commit is contained in:
@@ -387,8 +387,10 @@ globalToastEvent.on(ToastType.SHOW_TODO, () => {
|
||||
})
|
||||
|
||||
const sharePageShow = ref(false)
|
||||
globalToastEvent.on(ToastType.SHOW_SHAREPAGE, () => {
|
||||
sharePageShow.value = true
|
||||
const isFromTodoList = ref(false)
|
||||
globalToastEvent.on(ToastType.SHOW_SHAREPAGE, (env) => {
|
||||
sharePageShow.value = true;
|
||||
isFromTodoList.value = env;
|
||||
})
|
||||
|
||||
const popupMoreShow = ref(false)
|
||||
@@ -399,7 +401,6 @@ globalToastEvent.on(ToastType.SHOW_POPUPMORE, () => {
|
||||
const gamePageShow = ref(false)
|
||||
const gameSlideId = ref('')
|
||||
globalToastEvent.on(ToastType.SHOW_GAMEPAGE, (slide) => {
|
||||
console.log("slide in home page:", slide.id);
|
||||
gameSlideId.value = slide.id;
|
||||
gamePageShow.value = true
|
||||
})
|
||||
@@ -462,6 +463,22 @@ const handleAddress = (id) => {
|
||||
<img src="../assets/images/new/award.png" alt="奖励">
|
||||
</div>
|
||||
|
||||
<div class="scene-item item-ma1">
|
||||
<img src="../assets/images/new/ma1.png" alt="马1">
|
||||
</div>
|
||||
|
||||
<div class="scene-item item-ma2">
|
||||
<img src="../assets/images/new/ma2.png" alt="马2">
|
||||
</div>
|
||||
|
||||
<div class="scene-item item-ma3">
|
||||
<img src="../assets/images/new/ma3.png" alt="马3">
|
||||
</div>
|
||||
|
||||
<div class="scene-item item-ma4">
|
||||
<img src="../assets/images/new/ma4.png" alt="马4">
|
||||
</div>
|
||||
|
||||
<div class="scene-item item-8" @click="popupMore">
|
||||
<img src="../assets/images/new/learn-more.png" alt="更多金喜">
|
||||
</div>
|
||||
@@ -480,7 +497,7 @@ const handleAddress = (id) => {
|
||||
<GamePage :show="gamePageShow" @close="gamePageShow = false" :gameSlideId="gameSlideId" />
|
||||
<GameDemo :show="gameDemoShow" @close="gameDemoShow = false" />
|
||||
<Lottery :show="lotteryShow" @close="lotteryShow = false" :type="lotteryType" :data="lotteryNoticeData"></Lottery>
|
||||
<SharePage :show="sharePageShow" @close="sharePageShow = false"></SharePage>
|
||||
<SharePage :show="sharePageShow" @close="sharePageShow = false" :isFromTodoList="isFromTodoList"></SharePage>
|
||||
<PopupMore :show="popupMoreShow" @close="popupMoreShow = false"></PopupMore>
|
||||
</template>
|
||||
|
||||
@@ -568,6 +585,76 @@ const handleAddress = (id) => {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* 马的位置 */
|
||||
.item-ma1 {
|
||||
width: 14vw;
|
||||
top: 47vw;
|
||||
left: 4.4vw;
|
||||
}
|
||||
.item-ma2 {
|
||||
width: 14vw;
|
||||
top: 47vw;
|
||||
right: 4.4vw;
|
||||
}
|
||||
.item-ma3 {
|
||||
width: 21vw;
|
||||
top: 162vw;
|
||||
left: 3vw;
|
||||
}
|
||||
.item-ma4 {
|
||||
width: 25vw;
|
||||
top: 128vw;
|
||||
right: 6.6vw;
|
||||
}
|
||||
|
||||
/* 通用“奔跑”动画:轻微上下+前后+缩放 */
|
||||
@keyframes horse-gallop {
|
||||
0% {
|
||||
transform: translateY(0) translateX(0) scale(1) rotate(0deg);
|
||||
}
|
||||
20% {
|
||||
transform: translateY(-2px) translateX(2px) scale(1.01) rotate(-1deg);
|
||||
}
|
||||
40% {
|
||||
transform: translateY(0) translateX(3px) scale(1.01) rotate(1deg);
|
||||
}
|
||||
60% {
|
||||
transform: translateY(-3px) translateX(1px) scale(1.02) rotate(-0.5deg);
|
||||
}
|
||||
80% {
|
||||
transform: translateY(0) translateX(0) scale(1.01) rotate(0.5deg);
|
||||
}
|
||||
100% {
|
||||
transform: translateY(0) translateX(0) scale(1) rotate(0deg);
|
||||
}
|
||||
}
|
||||
|
||||
/* 每匹马用同一个 keyframes,但频率和起始时间不同,让节奏更自然 */
|
||||
.scene-item.item-ma1 img {
|
||||
animation: horse-gallop 1.0s infinite ease-in-out;
|
||||
animation-delay: 0s;
|
||||
transform-origin: center bottom;
|
||||
}
|
||||
|
||||
.scene-item.item-ma2 img {
|
||||
animation: horse-gallop 1.25s infinite ease-in-out;
|
||||
/* 负 delay:进场时就已经错位,不会同时起跳 */
|
||||
animation-delay: -0.3s;
|
||||
transform-origin: center bottom;
|
||||
}
|
||||
|
||||
.scene-item.item-ma3 img {
|
||||
animation: horse-gallop 1.4s infinite ease-in-out;
|
||||
animation-delay: -0.6s;
|
||||
transform-origin: center bottom;
|
||||
}
|
||||
|
||||
.scene-item.item-ma4 img {
|
||||
animation: horse-gallop 1.15s infinite ease-in-out;
|
||||
animation-delay: -0.9s;
|
||||
transform-origin: center bottom;
|
||||
}
|
||||
|
||||
.item-1 {
|
||||
width: 21vw;
|
||||
bottom: 7vw;
|
||||
@@ -655,6 +742,12 @@ const handleAddress = (id) => {
|
||||
animation-delay: 0s;
|
||||
}
|
||||
|
||||
.item-ma1 {
|
||||
width: 14vw;
|
||||
top: 47vw;
|
||||
left: 4.4vw;
|
||||
}
|
||||
|
||||
@keyframes loginloading {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
|
||||
@@ -5,27 +5,35 @@
|
||||
<div class="guangyun" ref="guangyunRef"></div>
|
||||
<div class="lottery-scene" ref="sceneRef">
|
||||
<div class="lottery-card" ref="cardRef">
|
||||
<div class="lottery-prize">
|
||||
<div class="lottery-prize" :style="prizeBackgroundImg">
|
||||
<div class="lottery-layer" ref="layerRef">
|
||||
|
||||
<div class="lottery-mask-image" ref="maskBgRef">
|
||||
<div class="lottery-reveal lottery-image" v-show="activePrizeData.prize_code !== 'NO'">
|
||||
<div class="lottery-image" :class="'USER_' + activePrizeData.prize_code"></div>
|
||||
<div class="lottery-image" :class="'USER_' + 'NO'"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 标题(保持原逻辑) -->
|
||||
<div
|
||||
<!-- <div
|
||||
class="lottery-title"
|
||||
:class="props.type === 'notice' && 'notice'"
|
||||
ref="titleRef"
|
||||
v-show="activePrizeData.prize_code !== 'NO'"
|
||||
></div> -->
|
||||
|
||||
<div
|
||||
class="lottery-title-no"
|
||||
:class="props.type === 'notice' && 'notice'"
|
||||
ref="titleRef"
|
||||
v-show="btngroupShow && activePrizeData.prize_code !== 'NO'"
|
||||
></div>
|
||||
|
||||
<div class="lottery-btngroup" v-show="btngroupShow">
|
||||
<div class="btn-more" @click="navigatePopupMore"></div>
|
||||
<div class="btn-kaixin" @click="handleLotteryAction" v-if="activePrizeData.prize_code !== 'NO'"></div>
|
||||
<div class="btn-more" @click="navigateSharePage"></div>
|
||||
<!-- <div class="btn-kaixin" @click="handleLotteryAction" v-if="activePrizeData.prize_code !== 'NO'"></div> -->
|
||||
<div class="back-home" @click="handleGoHomeAction" v-if="activePrizeData.prize_code !== 'NO'"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,16 +45,16 @@
|
||||
|
||||
<script setup>
|
||||
import { gsap } from "gsap";
|
||||
import { ref, watch, onMounted, onUnmounted } from "vue"
|
||||
import { ref, watch, onMounted, onUnmounted, computed } from "vue"
|
||||
import globalToastEvent, { ToastType } from "../globalToastEvent";
|
||||
import ModalTransition from "./ModalTransition.vue"
|
||||
import confetti from "canvas-confetti";
|
||||
import { Request, Sleep } from "../libs/utils"
|
||||
import { globalStore } from "@/globalstore";
|
||||
|
||||
const navigatePopupMore = () => {
|
||||
globalToastEvent.emit(ToastType.SHOW_POPUPMORE)
|
||||
// globalToastEvent.emit(ToastType.SHOW_SHAREPAGE)
|
||||
const navigateSharePage = () => {
|
||||
// globalToastEvent.emit(ToastType.SHOW_POPUPMORE)
|
||||
globalToastEvent.emit(ToastType.SHOW_SHAREPAGE)
|
||||
}
|
||||
|
||||
|
||||
@@ -83,6 +91,14 @@ const closeThis = () => {
|
||||
emit("close")
|
||||
}
|
||||
|
||||
const prizeBackgroundImg = computed(() => {
|
||||
if (activePrizeData.value.prize_code === 'NO') {
|
||||
return `background-image: url("../assets/images/new/NO-prize-bg.png")`
|
||||
} else {
|
||||
return `background-image: url("../assets/images/new/lottery-bg.png")`
|
||||
}
|
||||
})
|
||||
|
||||
// const handleBtnMore = () => {
|
||||
// closeThis()
|
||||
// globalToastEvent.emit(ToastType.SHOW_AD)
|
||||
@@ -102,6 +118,12 @@ const handleLotteryAction = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const handleGoHomeAction = async () => {
|
||||
//实物
|
||||
closeThis()
|
||||
globalToastEvent.emit(ToastType.CLOSE_ALL);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
gsap.registerPlugin()
|
||||
// initAnimateStyle()
|
||||
@@ -416,7 +438,7 @@ onUnmounted(() => {
|
||||
.lottery-image.USER_NO {
|
||||
background-size: 60% auto;
|
||||
background-position: center center;
|
||||
background-image: url("../assets/images/USER_NO.webp");
|
||||
background-image: url("../assets/images/new/USER_NO.png");
|
||||
}
|
||||
|
||||
.lottery-image.USER_LZ_XS_SPZ_30ML {
|
||||
@@ -468,6 +490,19 @@ onUnmounted(() => {
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.lottery-title-no {
|
||||
position: absolute;
|
||||
top: 24vw;
|
||||
left: 50%;
|
||||
transform: translateX(-50%) !important;
|
||||
width: 40vw;
|
||||
height: 20vw;
|
||||
background-image: url("../assets/images/new/no-lottery-title.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100%;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.lottery-title.notice {
|
||||
width: 39.259259vw;
|
||||
height: 7.12963vw;
|
||||
@@ -524,7 +559,7 @@ onUnmounted(() => {
|
||||
.btn-more {
|
||||
width: 48.703704vw;
|
||||
height: 18.240741vw;
|
||||
background-image: url("../assets/images/new/more-btn.png");
|
||||
background-image: url("../assets/images/new/share-btn.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
@@ -537,6 +572,14 @@ onUnmounted(() => {
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.back-home {
|
||||
width: 48.703704vw;
|
||||
height: 18.240741vw;
|
||||
background-image: url("../assets/images/new/back-home.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
|
||||
@keyframes rotateGuangyun {
|
||||
0% {
|
||||
@@ -604,7 +647,8 @@ onUnmounted(() => {
|
||||
left: -6vw;
|
||||
width: 100vw;
|
||||
height: 244vw;
|
||||
background-image: url("../assets/images/new/lottery-bg.png");
|
||||
/* background-image: url("../assets/images/new/lottery-bg.png"); */
|
||||
/* background-image: url("../assets/images/new/NO-prize-bg.png"); */
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
@@ -60,6 +60,15 @@ const startNow = () => {
|
||||
align-items: center;
|
||||
position: relative;
|
||||
min-height: -webkit-fill-available;
|
||||
/* animation: rotate-bg 10s linear infinite; */
|
||||
}
|
||||
@keyframes rotate-bg {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
.home-bg {
|
||||
position: absolute;
|
||||
|
||||
@@ -1,13 +1,22 @@
|
||||
<script setup>
|
||||
import { Storage, generateQR } from "../libs/utils.js"
|
||||
import ModalTransition from "./ModalTransition.vue"
|
||||
import { ref, watch } from "vue"
|
||||
import { ref, watch, computed } from "vue"
|
||||
import Haibao from "../libs/haibao.js"
|
||||
import ruleBg from "../assets/images/new/rule-share.png"
|
||||
import globalToastEvent, { ToastType } from '../globalToastEvent';
|
||||
import { globalStore } from "../globalstore.js";
|
||||
import share5 from '../assets/images/new/share-bg-5.png';
|
||||
import share4 from '../assets/images/new/share-bg-4.png';
|
||||
import share3 from '../assets/images/new/share-bg-3.png';
|
||||
import share2 from '../assets/images/new/share-bg-2.png';
|
||||
import share1 from '../assets/images/new/share-bg-1.png';
|
||||
import todoListBg from '../assets/images/new/todolist-bg.png';
|
||||
import todoListImg from '../assets/images/new/todolist-img.png';
|
||||
|
||||
const props = defineProps({
|
||||
show: false,
|
||||
isFromTodoList: false
|
||||
})
|
||||
|
||||
watch(() => props.show, async (newVal) => {
|
||||
@@ -18,10 +27,21 @@ watch(() => props.show, async (newVal) => {
|
||||
}, { immediate: true })
|
||||
|
||||
const emit = defineEmits(['close'])
|
||||
const gotoLottery = () => {
|
||||
globalToastEvent.emit(ToastType.SHOW_LOTTERY);
|
||||
|
||||
const gameImgMap = {
|
||||
game1: share1,
|
||||
game2: share2,
|
||||
game3: share3,
|
||||
game4: share4,
|
||||
game5: share5
|
||||
}
|
||||
|
||||
// const haibaoBackgroundImg = computed(() => {
|
||||
// const id = Number(props.gameSlideId) || 1;
|
||||
// const img = gameImgMap[`game${id}`] || game1;
|
||||
// return { backgroundImage: `url(${img})` };
|
||||
// })
|
||||
|
||||
const cancelBtn = () => {
|
||||
emit('close')
|
||||
}
|
||||
@@ -32,8 +52,13 @@ const openHaibao = (e) => {
|
||||
handleHaibao()
|
||||
}
|
||||
|
||||
const haibaoBackgroundImg = ref({});
|
||||
const handleHaibao = async () => {
|
||||
const loading = weui.loading()
|
||||
const loading = weui.loading();
|
||||
|
||||
const img = gameImgMap[globalStore.game_id] || 'share1';
|
||||
haibaoBackgroundImg.value = props.isFromTodoList ? { backgroundImage: `url(${todoListImg})` } : { backgroundImage: `url(${img})` };
|
||||
|
||||
const infos = Storage.get("userinfos")
|
||||
const haibaoCover = new Haibao(1080, 2160);
|
||||
|
||||
@@ -60,15 +85,11 @@ const handleHaibao = async () => {
|
||||
<ModalTransition class="popup" :show="show">
|
||||
<div class="home-wrapper">
|
||||
<div class="fullsection">
|
||||
<div class="haibao">
|
||||
<div class="haibao" :style="haibaoBackgroundImg">
|
||||
<img :src="haibaoUrl" alt="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="scene-item item-4">
|
||||
<img src="../assets/images/new/choujiang.png" @click="gotoLottery" alt="立即抽奖">
|
||||
</div> -->
|
||||
|
||||
<div class="scene-item item-5">
|
||||
<img src="../assets/images/new/close-btn.png" @click="cancelBtn" alt="关闭">
|
||||
</div>
|
||||
@@ -78,9 +99,11 @@ const handleHaibao = async () => {
|
||||
|
||||
<style scoped>
|
||||
.home-wrapper {
|
||||
background-size: contain;
|
||||
background-position: center;
|
||||
width: 100vw;
|
||||
height: 217vw;
|
||||
background-image: url("../assets/images/new/share-bg.png");
|
||||
background-image: url("../assets/images/new/todolist-bg.png");
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
display: flex;
|
||||
@@ -166,7 +189,7 @@ const handleHaibao = async () => {
|
||||
width: 40vw;
|
||||
}
|
||||
.item-5 {
|
||||
top: 166vw;
|
||||
top: 170vw;
|
||||
width: 14vw;
|
||||
}
|
||||
.scene-item img {
|
||||
|
||||
@@ -42,7 +42,7 @@ const userhaibaoCover = computed(() => {
|
||||
})
|
||||
|
||||
const openHaibao = async (e) => {
|
||||
globalToastEvent.emit(ToastType.SHOW_SHAREPAGE);
|
||||
globalToastEvent.emit(ToastType.SHOW_SHAREPAGE, true);
|
||||
}
|
||||
|
||||
const openQiwei = (e) => {
|
||||
|
||||
Reference in New Issue
Block a user