diff --git a/src/assets/font/fzcy.ttf b/src/assets/font/fzcy.ttf index c528cb1..e9e0243 100644 Binary files a/src/assets/font/fzcy.ttf and b/src/assets/font/fzcy.ttf differ diff --git a/src/components/Question.vue b/src/components/Question.vue index ecee368..2a2412e 100644 --- a/src/components/Question.vue +++ b/src/components/Question.vue @@ -18,6 +18,7 @@ const activeId = ref(""); // 当前题目所选答案选项 const showResultBtn = ref(false); // 答题事件 const answerFn = (item, event) => { + console.log('current:',currentId.value); let e = event.target.parentElement.parentElement; activeId.value = item.aid; debounceTap(e, () => { @@ -50,6 +51,7 @@ const answerFn = (item, event) => { console.log("jieshu"); Toast("答题结束"); gsap.set(".answer", { pointerEvents: "none" }); + return; } else { activeId.value = ""; @@ -73,17 +75,19 @@ const answerFn = (item, event) => { answerList.value[has].text = item.text; answerList.value[has].aid = item.aid; } - resultBtnAni.play(); + // resultBtnAni.play(); + // 答题结束 + showResult() } console.log("答案库", answerList.value); }); }; const mbtiArr = [[], [], [], []]; //四组数组分别存放 E&I,S&T,T&F,J&P四组结果 -const showResult = (event) => { - let e = event.target; +const showResult = () => { + gsap.set(".answer-box", { pointerEvents: "none" }); - debounceTap(e, async () => { + console.log("答题结果:", answerList.value); answerList.value.forEach((element) => { if (element.answer == "E" || element.answer == "I") @@ -115,7 +119,7 @@ const showResult = (event) => { } // Toast("你的MBTI测试结果:" + mbti); - resultBtnAni.reverse(); + // resultBtnAni.reverse(); gsap.to(".prev-btn", { duration: 0.5, x: "-=20px", autoAlpha: 0 }); questionOut.timeScale(2); questionOut.restart(); @@ -128,7 +132,7 @@ const showResult = (event) => { }, }); }); - }); + }; // 上一页函数 @@ -139,7 +143,7 @@ const prevePage = (event) => { gsap.to(".prev-btn", { duration: 0.5, x: "-=20px", autoAlpha: 0 }); } if (currentId.value >= 11) { - resultBtnAni.reverse(); + // resultBtnAni.reverse(); gsap.set(".answer", { pointerEvents: "initial" }); } activeId.value = ""; @@ -170,14 +174,14 @@ const questionOut = gsap.timeline({ }); // 查看结果事件及动画 -const resultBtnAni = gsap.timeline({ paused: true }); +// const resultBtnAni = gsap.timeline({ paused: true }); onMounted(() => { // 适配 if (!judgeBigScreen()) { gsap.set(".answer-box", { scale: 0.9, marginTop: "-20px" }); } - resultBtnAni.from(".showResult-btn", { y: 200, autoAlpha: 0 }); + // resultBtnAni.from(".showResult-btn", { y: 200, autoAlpha: 0 }); questionEntry .from(".question", { y: 100, autoAlpha: 0 }) .from(".answer-0", { @@ -278,7 +282,7 @@ onMounted(() => { -
+
diff --git a/src/components/Result.vue b/src/components/Result.vue index fd886a0..e0aed2c 100644 --- a/src/components/Result.vue +++ b/src/components/Result.vue @@ -123,7 +123,7 @@ const createPoster = (event) => { { name: "product", src: mbtiObj.value.productPic, - pos: { w: mbtiObj.value.picPos.w, h: mbtiObj.value.picPos.h, x: 137, y: 911 }, + pos: { w: mbtiObj.value.picPos.w, h: mbtiObj.value.picPos.h, x: 137, y: 921 }, }, // 二维码 { diff --git a/src/page/Home/App.vue b/src/page/Home/App.vue index f203952..734b667 100644 --- a/src/page/Home/App.vue +++ b/src/page/Home/App.vue @@ -77,7 +77,7 @@ const drawFn = (item) => { } }; -const showResult = ref(true); +const showResult = ref(false); const resultFn = (item) => { if (item.action == "hide") { showResult.value = false; @@ -210,7 +210,6 @@ onMounted(() => { const playMusic = () => { - if(isAndriod){ var audioEle = document.getElementById("audio"); audioEle.play(); diff --git a/字体压缩.txt b/字体压缩.txt index 3258d6d..c7b9596 100644 --- a/字体压缩.txt +++ b/字体压缩.txt @@ -43,7 +43,7 @@ 2、平安理财保留调整、暂停和终止本活动的权利,并经公告后生效; - 点击右上角分享给你的好友! + 点击右上角分享给你的好友!*长按保存海报 2、AlimamaShuHeiTi