|
@@ -72,7 +72,7 @@
|
|
|
webkit-playsinline="true"
|
|
|
:src="`${config.cdnDir}videos/video2.mp4`"
|
|
|
@playing="isNeedToBofang = false"
|
|
|
- @ended="isLongImageVideo = false"
|
|
|
+ @ended="onFadeInVideoEnd"
|
|
|
@mousedown.passive.stop
|
|
|
@touchstart.passive.stop
|
|
|
@canplaythrough="onVideoCanPlayThrough"
|
|
@@ -134,7 +134,6 @@ const mouseImg = utils.getImageUrl(`mouse.png`)
|
|
|
const comfirImg = utils.getImageUrl(`btn_concern.png`)
|
|
|
const skipImg = utils.getImageUrl(`skip.png`)
|
|
|
const bofangImg = utils.getImageUrl(`bofang.png`)
|
|
|
-const videoPostImg = utils.getImageUrl(`videobg.jpg`)
|
|
|
|
|
|
const longref$ = ref(null)
|
|
|
const video$ = ref(null)
|
|
@@ -155,11 +154,34 @@ function switchBgAudio() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// 过渡视频相关
|
|
|
+const videoPostImg = utils.getImageUrl(`videobg.jpg`)
|
|
|
+const isLongImageVideo = ref(true)
|
|
|
+const isNeedToBofang = ref(true)
|
|
|
+const isShowSkip = ref(false)
|
|
|
+const onVideoCanPlayThrough = () => {
|
|
|
+ if (video$.value) {
|
|
|
+ video$.value.play()
|
|
|
+ isNeedToBofang.value = false
|
|
|
+ }
|
|
|
+}
|
|
|
+const onSkipClick = () => {
|
|
|
+ isShowGuide.value = true
|
|
|
+ setTimeout(() => {
|
|
|
+ isLongImageVideo.value = false
|
|
|
+ }, 100);
|
|
|
+}
|
|
|
+function onFadeInVideoEnd() {
|
|
|
+ isShowGuide.value = true
|
|
|
+ setTimeout(() => {
|
|
|
+ isLongImageVideo.value = false
|
|
|
+ }, 100);
|
|
|
+}
|
|
|
+
|
|
|
// 动画帧相关
|
|
|
const lastAnimationTimeStamp = ref(0);
|
|
|
const animationFrameId = ref(0);
|
|
|
|
|
|
-
|
|
|
// 镜头平移相关
|
|
|
const translateLength = ref(0);
|
|
|
|
|
@@ -172,23 +194,6 @@ const itemW = computed(() => globalProperties.$isMobile || window.innerWidth < 1
|
|
|
|
|
|
const isShowDir = ref(false)
|
|
|
const isShowGuide = ref(false)
|
|
|
-const isLongImageVideo = ref(true)
|
|
|
-const isNeedToBofang = ref(true)
|
|
|
-const isShowSkip = ref(false)
|
|
|
-
|
|
|
-const onVideoCanPlayThrough = () => {
|
|
|
- if (video$.value) {
|
|
|
- video$.value.play()
|
|
|
- isNeedToBofang.value = false
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-const onSkipClick = () => {
|
|
|
- isShowGuide.value = true
|
|
|
- setTimeout(() => {
|
|
|
- isLongImageVideo.value = false
|
|
|
- }, 100);
|
|
|
-}
|
|
|
|
|
|
let firstIn = true
|
|
|
const onCloseGuide = () => {
|