|
@@ -1,23 +1,65 @@
|
|
|
<template>
|
|
|
<div class="startup-view">
|
|
|
<span class="font-load-trigger">这是为了尽早触发字体文件加载</span>
|
|
|
- <Transition
|
|
|
- name="fade-in"
|
|
|
+
|
|
|
+ <!-- 背景序列帧 -->
|
|
|
+ <SerialFrames
|
|
|
+ class="bg-serial-frames"
|
|
|
+ :image-src="require(`@/assets/images/serial-frame-startup.png`)"
|
|
|
+ :total-width="22950"
|
|
|
+ :height="675"
|
|
|
+ :frame-number="51"
|
|
|
+ :frame-duration="55"
|
|
|
+ />
|
|
|
+
|
|
|
+ <img
|
|
|
+ class="title"
|
|
|
+ src="@/assets/images/startup-title.png"
|
|
|
+ alt=""
|
|
|
+ draggable="false"
|
|
|
>
|
|
|
+
|
|
|
+ <Transition name="fade-in-out">
|
|
|
+ <div
|
|
|
+ v-if="isShowLoadingTip"
|
|
|
+ class="loading-tip animation-show-hide"
|
|
|
+ >
|
|
|
+ loading...
|
|
|
+ </div>
|
|
|
<button
|
|
|
- v-show="isShowStartBtn"
|
|
|
+ v-else-if="isShowStartBtn"
|
|
|
class="start"
|
|
|
- @click="onclickStart"
|
|
|
+ @click="onClickStart"
|
|
|
>
|
|
|
+ <img
|
|
|
+ class="bg"
|
|
|
+ src="@/assets/images/start-btn-bg.png"
|
|
|
+ alt=""
|
|
|
+ draggable="false"
|
|
|
+ >
|
|
|
开始
|
|
|
</button>
|
|
|
</Transition>
|
|
|
+
|
|
|
+ <Transition name="fade-in">
|
|
|
+ <video
|
|
|
+ v-if="isShowVideo"
|
|
|
+ ref="videoEl"
|
|
|
+ class="transition-video"
|
|
|
+ src="@/assets/videos/startup.mp4"
|
|
|
+ playsinline
|
|
|
+ webkit-playsinline="true"
|
|
|
+ x5-video-player-type="h5"
|
|
|
+ muted
|
|
|
+ @ended="onVideoEnd"
|
|
|
+ />
|
|
|
+ </Transition>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import useSizeAdapt from "@/useFunctions/useSizeAdapt"
|
|
|
-import { ref, computed, watch, onMounted, inject } from "vue"
|
|
|
+import { ref, computed, watch, onMounted, inject, nextTick } from "vue"
|
|
|
import { useRoute, useRouter } from "vue-router"
|
|
|
import { useStore } from "vuex"
|
|
|
|
|
@@ -32,11 +74,26 @@ const {
|
|
|
windowSizeWhenDesignForRef,
|
|
|
} = useSizeAdapt()
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+const isShowLoadingTip = ref(true)
|
|
|
const isShowStartBtn = ref(false)
|
|
|
setTimeout(() => {
|
|
|
- isShowStartBtn.value = true
|
|
|
+ isShowLoadingTip.value = false
|
|
|
}, 2000)
|
|
|
-function onclickStart() {
|
|
|
+setTimeout(() => {
|
|
|
+ isShowStartBtn.value = true
|
|
|
+}, 4000)
|
|
|
+
|
|
|
+const isShowVideo = ref(false)
|
|
|
+const videoEl = ref(null)
|
|
|
+function onClickStart() {
|
|
|
+ isShowVideo.value = true
|
|
|
+ nextTick(() => {
|
|
|
+ videoEl.value.play()
|
|
|
+ })
|
|
|
+}
|
|
|
+function onVideoEnd() {
|
|
|
store.dispatch('recordShownStartup')
|
|
|
}
|
|
|
</script>
|
|
@@ -57,6 +114,33 @@ function onclickStart() {
|
|
|
opacity: 0;
|
|
|
font-family: KaiTi, KaiTi;
|
|
|
}
|
|
|
+
|
|
|
+ >.bg-serial-frames{
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ mix-blend-mode: multiply;
|
|
|
+ }
|
|
|
+
|
|
|
+ >img.title{
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ top: 40%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ width: calc(152 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ }
|
|
|
+
|
|
|
+ >.loading-tip{
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ bottom: calc(70 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ transform: translateX(-50%);
|
|
|
+ font-family: KingHwa_OldSong, KingHwa_OldSong;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: calc(20 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ color: #FFFFFF;
|
|
|
+ line-height: 1.5em;
|
|
|
+ }
|
|
|
>button.start{
|
|
|
position: absolute;
|
|
|
left: 50%;
|
|
@@ -64,15 +148,40 @@ function onclickStart() {
|
|
|
transform: translateX(-50%);
|
|
|
width: calc(71 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
height: calc(69 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
- background-image: url(@/assets/images/start-btn-bg.png);
|
|
|
- background-size: cover;
|
|
|
- background-repeat: no-repeat;
|
|
|
- background-position: center center;
|
|
|
font-family: KaiTi, KaiTi;
|
|
|
font-weight: 400;
|
|
|
font-size: calc(24 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
color: #FFFFFF;
|
|
|
line-height: calc(29 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
+ >img.bg{
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ animation-name: spin;
|
|
|
+ animation-duration: 1s;
|
|
|
+ animation-timing-function: linear;
|
|
|
+ animation-iteration-count: infinite;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ >video.transition-video{
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ object-fit: cover;
|
|
|
+ }
|
|
|
+
|
|
|
+ @keyframes spin {
|
|
|
+ 0% {
|
|
|
+ transform: rotate(0deg);
|
|
|
+ }
|
|
|
+ 100% {
|
|
|
+ transform: rotate(360deg);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|