完成抽奖页面,结果页面事件逻辑,待给到设计稿更新页面

This commit is contained in:
Andy Leong
2024-01-15 18:44:31 +08:00
parent 96ad18a766
commit 1024c33440
21 changed files with 385 additions and 50 deletions

View File

@@ -2,8 +2,10 @@
<div class="home">
<Index v-if="showIndex" @IndexPage="indexFn"></Index>
<Question v-if="showQuestion" @QuestionPage="questionFn"></Question>
<Loading v-if="showLoad" @LoadPage="loadFn"></Loading>
<Result v-if="showResult" @ResultPage="resultFn"></Result>
<MyPrize v-if="showMyPrize" @MyPrizePage="myPrizeFn"></MyPrize>
<Draw v-if="showDraw" @DrawPage="drawFn"></Draw>
<Loading v-if="showLoad" @LoadPage="loadFn"></Loading>
</div>
</template>
@@ -13,6 +15,8 @@ import Loading from "@/components/Loading";
import Index from "@/components/Index";
import Question from "@/components/Question";
import MyPrize from "@/components/MyPrize";
import Draw from "@/components/Draw";
import Result from "@/components/Result";
import { createBGM } from "@/plugins";
const showLoad = ref(true);
@@ -50,6 +54,20 @@ const myPrizeFn = (item) => {
}
};
const showDraw = ref(false);
const drawFn = (item) => {
if (item.action == "hide") {
showDraw.value = false;
}
};
const showResult = ref(true);
const resultFn = (item) => {
if (item.action == "hide") {
showResult.value = false;
}
};
onMounted(() => {
// createBGM();
});