|
@@ -236,8 +236,6 @@
|
|
|
<div
|
|
|
ref="scrollerEl"
|
|
|
class="scroller"
|
|
|
- @touchstart="handletouchstart($event)"
|
|
|
- @touchmove="touchMove($event)"
|
|
|
>
|
|
|
<div
|
|
|
class="inner"
|
|
@@ -302,12 +300,12 @@
|
|
|
})"
|
|
|
/>
|
|
|
</Transition>
|
|
|
- <button
|
|
|
- class="test"
|
|
|
- @click="onClickTest"
|
|
|
- >
|
|
|
- 触发转场视频(调试专用)
|
|
|
- </button>
|
|
|
+ <BtnClickMe
|
|
|
+ class="go-next-page"
|
|
|
+ text="点击继续"
|
|
|
+ :is-show="isShowBtnGoNextPage"
|
|
|
+ @click="onClickGoNextPage"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -593,36 +591,44 @@ function showBigPainting() {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 上滑跳转新页面
|
|
|
+ * 跳转新页面
|
|
|
*/
|
|
|
const videoFadeToNextPageEl = ref(null)
|
|
|
const isShowVideoFadeToNextPage = ref(false)
|
|
|
const isShowSkip = ref(false)
|
|
|
-const fingerPosYWhenTouchStart = ref(0)
|
|
|
-const isAtBottomWhenTouchStart = ref(false)
|
|
|
-const handletouchstart = (event) => {
|
|
|
- fingerPosYWhenTouchStart.value = event.changedTouches[0].pageY
|
|
|
- if (Math.abs(scrollerEl.value.scrollTop + scrollerEl.value.clientHeight - scrollerEl.value.scrollHeight) <= 1) {
|
|
|
- isAtBottomWhenTouchStart.value = true
|
|
|
+// const fingerPosYWhenTouchStart = ref(0)
|
|
|
+// const isAtBottomWhenTouchStart = ref(false)
|
|
|
+// const handletouchstart = (event) => {
|
|
|
+// fingerPosYWhenTouchStart.value = event.changedTouches[0].pageY
|
|
|
+// if (Math.abs(scrollerEl.value.scrollTop + scrollerEl.value.clientHeight - scrollerEl.value.scrollHeight) <= 1) {
|
|
|
+// isAtBottomWhenTouchStart.value = true
|
|
|
+// } else {
|
|
|
+// isAtBottomWhenTouchStart.value = false
|
|
|
+// }
|
|
|
+// }
|
|
|
+// const touchMove = (event) => {
|
|
|
+// let currentY = event.changedTouches[0].pageY
|
|
|
+// let tY = currentY - fingerPosYWhenTouchStart.value
|
|
|
+// if (tY < -1 && isAtBottomWhenTouchStart.value) {
|
|
|
+// isShowVideoFadeToNextPage.value = true
|
|
|
+// nextTick(() => {
|
|
|
+// videoFadeToNextPageEl.value.play()
|
|
|
+// })
|
|
|
+// setTimeout(() => {
|
|
|
+// isShowSkip.value = true
|
|
|
+// }, 2000)
|
|
|
+// }
|
|
|
+// }
|
|
|
+const isShowBtnGoNextPage = ref(false)
|
|
|
+watch(scrollerElScrollTop, (v) => {
|
|
|
+ if (Math.abs(v + windowHeight.value - scrollerEl.value.scrollHeight) < 3) {
|
|
|
+ isShowBtnGoNextPage.value = true
|
|
|
} else {
|
|
|
- isAtBottomWhenTouchStart.value = false
|
|
|
- }
|
|
|
-}
|
|
|
-const touchMove = (event) => {
|
|
|
- let currentY = event.changedTouches[0].pageY
|
|
|
- let tY = currentY - fingerPosYWhenTouchStart.value
|
|
|
- if (tY < -1 && isAtBottomWhenTouchStart.value) {
|
|
|
- isShowVideoFadeToNextPage.value = true
|
|
|
- nextTick(() => {
|
|
|
- videoFadeToNextPageEl.value.play()
|
|
|
- })
|
|
|
- setTimeout(() => {
|
|
|
- isShowSkip.value = true
|
|
|
- }, 2000)
|
|
|
+ isShowBtnGoNextPage.value = false
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
-function onClickTest() {
|
|
|
+})
|
|
|
+function onClickGoNextPage() {
|
|
|
+ isShowBtnGoNextPage.value = false
|
|
|
isShowVideoFadeToNextPage.value = true
|
|
|
nextTick(() => {
|
|
|
videoFadeToNextPageEl.value.play()
|
|
@@ -902,7 +908,7 @@ function onClickTest() {
|
|
|
>.hotspot-detail.painting-detail{
|
|
|
backdrop-filter: blur(calc(20 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')));
|
|
|
}
|
|
|
- >.fade-to-next-page{
|
|
|
+ >video.fade-to-next-page{
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
top: 0;
|
|
@@ -912,13 +918,12 @@ function onClickTest() {
|
|
|
z-index: 20;
|
|
|
}
|
|
|
|
|
|
- >button.test{
|
|
|
+ >button.go-next-page{
|
|
|
position: absolute;
|
|
|
- left: 0;
|
|
|
- top: 0;
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
+ left: 50%;
|
|
|
+ bottom: calc(25 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
|
|
|
z-index: 20;
|
|
|
+ transform: translate(-50%, 0);
|
|
|
}
|
|
|
}
|
|
|
</style>
|