|
@@ -7,15 +7,22 @@
|
|
<div class="content-img">
|
|
<div class="content-img">
|
|
<img src="@/assets/images/wakeup/maturity/shadow-bg.png" >
|
|
<img src="@/assets/images/wakeup/maturity/shadow-bg.png" >
|
|
</div>
|
|
</div>
|
|
- <div>
|
|
|
|
|
|
+ <div class="group-btn">
|
|
<img src="@/assets/images/wakeup/maturity/btn1.png" >
|
|
<img src="@/assets/images/wakeup/maturity/btn1.png" >
|
|
<img src="@/assets/images/wakeup/maturity/btn2.png" >
|
|
<img src="@/assets/images/wakeup/maturity/btn2.png" >
|
|
<img src="@/assets/images/wakeup/maturity/btn3.png" >
|
|
<img src="@/assets/images/wakeup/maturity/btn3.png" >
|
|
<img src="@/assets/images/wakeup/maturity/btn4.png" >
|
|
<img src="@/assets/images/wakeup/maturity/btn4.png" >
|
|
-<!-- <img src="@/assets/images/wakeup/maturity/btn5.png" >-->
|
|
|
|
|
|
+ <img src="@/assets/images/wakeup/maturity/btn5.png" >
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div></div>
|
|
|
|
|
|
+ <div class="content-right">
|
|
|
|
+ <img class="btn-img" src="@/assets/images/wakeup/maturity/pre-qustion.png" >
|
|
|
|
+ <div class="time">
|
|
|
|
+ <img src="@/assets/images/wakeup/maturity/time.png" >
|
|
|
|
+ <p> {{ formattedTime(elapsedTime) }}</p>
|
|
|
|
+ </div>
|
|
|
|
+ <img class="btn-img" src="@/assets/images/wakeup/maturity/submit.png" >
|
|
|
|
+ </div>
|
|
<!-- <div class="top">-->
|
|
<!-- <div class="top">-->
|
|
<!-- <img src="@/assets/images/wakeup/maturity/maturity-game-title.png" >-->
|
|
<!-- <img src="@/assets/images/wakeup/maturity/maturity-game-title.png" >-->
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
@@ -72,16 +79,60 @@ function jumpTo(path) {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+//计时器
|
|
|
|
+const elapsedTime = ref(0);
|
|
|
|
+const timerId = ref(null);
|
|
|
|
+const isRunning = ref(false);
|
|
|
|
+
|
|
|
|
+const startTimer = () => {
|
|
|
|
+ if (!isRunning.value) {
|
|
|
|
+ isRunning.value = true;
|
|
|
|
+ timerId.value = setInterval(() => {
|
|
|
|
+ elapsedTime.value += 1000;
|
|
|
|
+ }, 1000);
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const stopTimer = () => {
|
|
|
|
+ if (isRunning.value) {
|
|
|
|
+ isRunning.value = false;
|
|
|
|
+ clearInterval(timerId.value);
|
|
|
|
+ timerId.value = null;
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const resetTimer = () => {
|
|
|
|
+ stopTimer();
|
|
|
|
+ elapsedTime.value = 0;
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const formattedTime = (ms) => {
|
|
|
|
+ const totalSeconds = Math.floor(ms / 1000);
|
|
|
|
+ const hours = String(Math.floor(totalSeconds / 3600)).padStart(2, '0');
|
|
|
|
+ const minutes = String(Math.floor((totalSeconds % 3600) / 60)).padStart(2, '0');
|
|
|
|
+ const seconds = String(totalSeconds % 60).padStart(2, '0');
|
|
|
|
+ return `${hours}:${minutes}:${seconds}`;
|
|
|
|
+};
|
|
|
|
+
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
|
+ // 可以在这里自动开始计时器,如果需要的话
|
|
|
|
+ startTimer();
|
|
setHeadinfo()
|
|
setHeadinfo()
|
|
-})
|
|
|
|
-
|
|
|
|
|
|
+});
|
|
|
|
|
|
|
|
+// onUnmounted(() => {
|
|
|
|
+ stopTimer();
|
|
|
|
+// });
|
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
|
+p{
|
|
|
|
+ margin: 0;
|
|
|
|
+ padding:0;
|
|
|
|
+}
|
|
.maturity-game-page{
|
|
.maturity-game-page{
|
|
background: url('@/assets/images/wakeup/maturity/maturity-game-bg.png') no-repeat;
|
|
background: url('@/assets/images/wakeup/maturity/maturity-game-bg.png') no-repeat;
|
|
background-size: 1920px 1080px;
|
|
background-size: 1920px 1080px;
|
|
@@ -99,13 +150,52 @@ onMounted(() => {
|
|
width: 1187px;
|
|
width: 1187px;
|
|
height: 424px;
|
|
height: 424px;
|
|
border: 1px solid;
|
|
border: 1px solid;
|
|
|
|
+ margin-top: 80px;
|
|
img{
|
|
img{
|
|
width: 1187px;
|
|
width: 1187px;
|
|
height: 424px;
|
|
height: 424px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .content-right{
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ align-items: center;
|
|
|
|
+ .btn-img{
|
|
|
|
+ width: 244px;
|
|
|
|
+ height: 77px;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ }
|
|
|
|
+ .time{
|
|
|
|
+ width:220px;
|
|
|
|
+ height: 50px;
|
|
|
|
+ //border: 1px solid;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ img{
|
|
|
|
+ width: 42px;
|
|
|
|
+ height: 42px;
|
|
|
|
+ //border: 1px solid;
|
|
|
|
+ }
|
|
|
|
+ p{
|
|
|
|
+ width: 150px;
|
|
|
|
+ font-weight: 300;
|
|
|
|
+ font-size: 32px;
|
|
|
|
+ color: #FFFFFF;
|
|
|
|
+ margin-left: 10px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .group-btn{
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-around;
|
|
|
|
+ margin-top: 80px;
|
|
|
|
+ img{
|
|
|
|
+ width: 200px;
|
|
|
|
+ height: 135px;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
</style>
|
|
</style>
|