|
@@ -203,16 +203,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="pagination">
|
|
|
- <div
|
|
|
- v-for="index in 3"
|
|
|
- :key="index"
|
|
|
- class="page-icon"
|
|
|
- :class="{
|
|
|
- active: index === currentAnchorIdx + 1
|
|
|
- }"
|
|
|
- />
|
|
|
- </div>
|
|
|
+ <PaginationComp
|
|
|
+ class="pagination"
|
|
|
+ :total="3"
|
|
|
+ :idx="currentAnchorIdx"
|
|
|
+ />
|
|
|
<BtnBack
|
|
|
@click="router.push({
|
|
|
name: 'HomeView',
|
|
@@ -252,6 +247,17 @@
|
|
|
x5-video-player-type="h5"
|
|
|
/>
|
|
|
</Transition>
|
|
|
+ <Transition name="fade-in">
|
|
|
+ <video
|
|
|
+ v-if="isShowVideoFadeAtPage3"
|
|
|
+ ref="videoFadeAtPage3El"
|
|
|
+ class="fade-to-other-page"
|
|
|
+ src="@/assets/videos/fade-from-more-content-to-game.mp4"
|
|
|
+ playsinline
|
|
|
+ webkit-playsinline="true"
|
|
|
+ x5-video-player-type="h5"
|
|
|
+ />
|
|
|
+ </Transition>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -265,6 +271,7 @@ import useSmoothSwipe from '@/useFunctions/useSmoothSwipe.js'
|
|
|
import { useWindowSize } from '@vueuse/core'
|
|
|
import OperationTip from "@/components/OperationTip.vue"
|
|
|
import useSizeAdapt from "@/useFunctions/useSizeAdapt.js"
|
|
|
+import PaginationComp from "@/components/PaginationComp.vue"
|
|
|
|
|
|
const route = useRoute()
|
|
|
const router = useRouter()
|
|
@@ -285,7 +292,7 @@ const { width: windowWidth, height: windowHeight } = useWindowSize()
|
|
|
const maxTranslateLength = computed(() => {
|
|
|
return windowHeight.value * windowWidthDesign / windowHeightDesign
|
|
|
})
|
|
|
-const { haveSwipedThisTime, translateLength, currentAnchorIdx } = useSmoothSwipe({
|
|
|
+const { haveSwipedThisTime, translateLength, currentAnchorIdx, goingToAnchorIdx } = useSmoothSwipe({
|
|
|
scrollTargetRef: scrollTarget,
|
|
|
maxTranslateLength,
|
|
|
viewportWidth: windowWidth,
|
|
@@ -375,36 +382,33 @@ function onClickEntryAtMoZhu(pathName) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * 跳转下一个页面
|
|
|
- */
|
|
|
-// const fingerPosXWhenTouchStart = ref(0)
|
|
|
-// const isAtBorderWhenTouchStart = ref(false)
|
|
|
-// const handletouchstart = (event) => {
|
|
|
-// fingerPosXWhenTouchStart.value = event.changedTouches[0].pageX
|
|
|
-// if (Math.abs(maxTranslateLength.value - translateLength.value - windowWidth.value) < 1) {
|
|
|
-// isAtBorderWhenTouchStart.value = true
|
|
|
-// } else {
|
|
|
-// isAtBorderWhenTouchStart.value = false
|
|
|
-// }
|
|
|
-// }
|
|
|
-// const touchMove = (event) => {
|
|
|
-// let currentX = event.changedTouches[0].pageX
|
|
|
-// let tX = currentX - fingerPosXWhenTouchStart.value
|
|
|
-// if (tX < -1 && isAtBorderWhenTouchStart.value) {
|
|
|
-// router.push({
|
|
|
-// name: 'Game',
|
|
|
+const videoFadeAtPage3El = ref(null)
|
|
|
+const isShowVideoFadeAtPage3 = ref(false)
|
|
|
+// function onClickEntryAtMoZhu(pathName) {
|
|
|
+// isShowVideoFadeAtMoZhu.value = true
|
|
|
+// nextTick(() => {
|
|
|
+// videoFadeAtMoZhuEl.value.addEventListener('ended', () => {
|
|
|
+// router.push({
|
|
|
+// name: pathName,
|
|
|
+// })
|
|
|
// })
|
|
|
-// }
|
|
|
+// videoFadeAtMoZhuEl.value.play()
|
|
|
+// })
|
|
|
// }
|
|
|
-watch(currentAnchorIdx, (v) => {
|
|
|
+watch(goingToAnchorIdx, (v) => {
|
|
|
if (v === 2) {
|
|
|
- router.push({
|
|
|
- name: 'Game',
|
|
|
- })
|
|
|
+ setTimeout(() => {
|
|
|
+ isShowVideoFadeAtPage3.value = true
|
|
|
+ nextTick(() => {
|
|
|
+ videoFadeAtPage3El.value.addEventListener('ended', () => {
|
|
|
+ router.push({
|
|
|
+ name: 'Game',
|
|
|
+ })
|
|
|
+ })
|
|
|
+ videoFadeAtPage3El.value.play()
|
|
|
+ })
|
|
|
+ }, 850)
|
|
|
}
|
|
|
-}, {
|
|
|
- immediate: true,
|
|
|
})
|
|
|
</script>
|
|
|
|
|
@@ -631,20 +635,6 @@ watch(currentAnchorIdx, (v) => {
|
|
|
left: 50%;
|
|
|
transform: translateX(-50%);
|
|
|
bottom: calc(22 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- gap: calc(23 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
- >.page-icon{
|
|
|
- width: calc(9 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
- height: calc(9 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
- border-radius: 50%;
|
|
|
- border: 1px solid #7B916B;
|
|
|
- min-width: 6px;
|
|
|
- min-height: 6px;
|
|
|
- }
|
|
|
- >.page-icon.active{
|
|
|
- background: #7B916B;
|
|
|
- }
|
|
|
}
|
|
|
>.operation-tip{
|
|
|
position: absolute;
|