|
@@ -4,7 +4,6 @@ import useDataUrl from '@/components/ownUse/useDataUrl'
|
|
|
// import useMove from '@/components/ownUse/useMove'
|
|
|
import { myData } from '@/utils/http'
|
|
|
import classNames from 'classnames'
|
|
|
-import history from '@/utils/history'
|
|
|
import { domDelOwnFu } from '@/utils/utilsSome'
|
|
|
import EndVideo from '@/components/EndVideo'
|
|
|
|
|
@@ -85,23 +84,6 @@ function A1home() {
|
|
|
// 最后一个过长动画
|
|
|
const [lastVideo, setLastVideo] = useState(false)
|
|
|
|
|
|
- const videoRefLast = useRef<HTMLVideoElement>(null)
|
|
|
-
|
|
|
- const lastVideoFu = useCallback(() => {
|
|
|
- setLastVideo(true)
|
|
|
-
|
|
|
- setTimeout(() => {
|
|
|
- if (videoRefLast.current) {
|
|
|
- videoRefLast.current.play()
|
|
|
- }
|
|
|
- }, 100)
|
|
|
-
|
|
|
- // 0.5s之后删除自己
|
|
|
- setTimeout(() => {
|
|
|
- domDelOwnFu('.A1videoBox')
|
|
|
- }, 500)
|
|
|
- }, [])
|
|
|
-
|
|
|
// 有关序列帧
|
|
|
const A1BfloorRef = useRef<HTMLImageElement>(null)
|
|
|
|
|
@@ -223,7 +205,7 @@ function A1home() {
|
|
|
/>
|
|
|
<div className={ind === myData.home.videos.length - 1 ? 'A1videoBtnBoxShow' : ''}>
|
|
|
<img className='A1videoBtnLogo' src={`${dataUrlSame}home/logo.png`} alt='' />
|
|
|
- <div className='A1videoBtnNext' onClick={lastVideoFu}>
|
|
|
+ <div className='A1videoBtnNext' onClick={() => setLastVideo(true)}>
|
|
|
<img src={`${dataUrlSame}home/nextLast.png`} alt='' />
|
|
|
<p>点击开始</p>
|
|
|
</div>
|
|
@@ -233,29 +215,12 @@ function A1home() {
|
|
|
|
|
|
{/* 最后一个过长动画 */}
|
|
|
|
|
|
- {/* <EndVideo lastVideo={lastVideo} delDom='.A1videoBox' src={dataUrlSame + myData.home.lastVideo} path='/visit'/> */}
|
|
|
-
|
|
|
- <div className={classNames('A1last', lastVideo ? 'A1lastAc' : '')}>
|
|
|
- <video
|
|
|
- ref={videoRefLast}
|
|
|
- playsInline
|
|
|
- muted
|
|
|
- webkit-playsinline='true'
|
|
|
- x5-video-player-type='h5'
|
|
|
- src={dataUrlSame + myData.home.lastVideo}
|
|
|
- onEnded={() => history.push('/visit')}
|
|
|
- >
|
|
|
- <source type='video/mp4' />
|
|
|
- Your browser does not support the video tag.
|
|
|
- </video>
|
|
|
-
|
|
|
- <div
|
|
|
- title='跳过'
|
|
|
- className='A1videoLastBtn'
|
|
|
- style={{ backgroundImage: `url(${dataUrlSame}home/tiao.png)` }}
|
|
|
- onClick={() => history.push('/visit')}
|
|
|
- ></div>
|
|
|
- </div>
|
|
|
+ <EndVideo
|
|
|
+ lastVideo={lastVideo}
|
|
|
+ delDom='.A1videoBox'
|
|
|
+ src={dataUrlSame + myData.home.lastVideo}
|
|
|
+ path='/visit'
|
|
|
+ />
|
|
|
</div>
|
|
|
)
|
|
|
}
|