灯笼选择页面及海报生产

This commit is contained in:
梁泽军
2025-01-15 16:27:44 +08:00
parent cc3a3df9bc
commit c55d13ebeb
43 changed files with 851 additions and 335 deletions

View File

@@ -1,6 +1,7 @@
<template>
<div class="home" @click.once="playMusic">
<Index v-if="showIndex" @IndexPage="indexFn"></Index>
<QuestionList v-if="showQuestionList" ref="QuestionListRef" @QuestionList="questionListFn" @showResult="onShowResult"></QuestionList>
<Question v-if="showQuestion" @QuestionPage="questionFn"></Question>
<Result v-if="showResult" @ResultPage="resultFn"></Result>
<MyPrize v-if="showMyPrize" @MyPrizePage="myPrizeFn"></MyPrize>
@@ -15,6 +16,7 @@ import gsap from "gsap";
import Loading from "@/components/Loading";
import Index from "@/components/Index";
import Question from "@/components/Question";
import QuestionList from "@/components/QuestionList";
import MyPrize from "@/components/MyPrize";
import Draw from "@/components/Draw";
import Result from "@/components/Result";
@@ -76,6 +78,20 @@ const myPrizeFn = (item) => {
}
};
const QuestionListRef= ref(null)
const showQuestionList = ref(true);
const questionListFn = (item) => {
if (item.action == "hide") {
showQuestionList.value = false;
}
};
const posterId = ref(1)
const onShowResult = (item) => {
posterId.value = item.pid || 1
showResult.value = true;
}
const showDraw = ref(false);
const drawFn = (item) => {
if (item.action == "hide") {
@@ -86,7 +102,11 @@ const drawFn = (item) => {
const showResult = ref(false);
const resultFn = (item) => {
if (item.action == "hide") {
showResult.value = false;
console.log('hide',showResult.value);
}
if (item.action == "showDraw") {
showDraw.value = true;
@@ -220,7 +240,7 @@ const playMusic = () => {
};
</script>
<style lang="scss" >
<style lang="scss">
#app {
overflow: hidden;
background: linear-gradient(135deg, #a11b15, #f80c00);