完成加载页、我的奖品页面、答题页逻辑,首页待优化动画
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<Index v-if="showIndex" @IndexPage="indexFn"></Index>
|
||||
<Question v-if="showQuestion" @QuestionPage="questionFn"></Question>
|
||||
<Loading v-if="showLoad" @LoadPage="loadFn"></Loading>
|
||||
<MyPrize v-if="showMyPrize" @MyPrizePage="myPrizeFn"></MyPrize>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -11,9 +12,10 @@ import gsap from "gsap";
|
||||
import Loading from "@/components/Loading";
|
||||
import Index from "@/components/Index";
|
||||
import Question from "@/components/Question";
|
||||
import MyPrize from "@/components/MyPrize";
|
||||
import { createBGM } from "@/plugins";
|
||||
|
||||
const showLoad = ref(false);
|
||||
const showLoad = ref(true);
|
||||
const loadFn = (item) => {
|
||||
if (item.action == "hide") {
|
||||
showLoad.value = false;
|
||||
@@ -26,15 +28,28 @@ const indexFn = (item) => {
|
||||
if (item.action == "hide") {
|
||||
showIndex.value = false;
|
||||
}
|
||||
if (item.action == "showMyPrize") {
|
||||
showMyPrize.value = true;
|
||||
}
|
||||
if (item.action == "start") {
|
||||
showQuestion.value = true;
|
||||
}
|
||||
};
|
||||
|
||||
const showQuestion = ref(true);
|
||||
const showQuestion = ref(false);
|
||||
const questionFn = (item) => {
|
||||
if (item.action == "hide") {
|
||||
showQuestion.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const showMyPrize = ref(false);
|
||||
const myPrizeFn = (item) => {
|
||||
if (item.action == "hide") {
|
||||
showMyPrize.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
// createBGM();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user