|
|
@@ -1,12 +1,12 @@
|
|
|
-import React, { useEffect, useState } from 'react'
|
|
|
+import React, { useEffect, useRef, useState } from 'react'
|
|
|
import styles from './index.module.scss'
|
|
|
import classNames from 'classnames'
|
|
|
import { useSelector } from 'react-redux'
|
|
|
import { RootState } from '@/store'
|
|
|
-import { Toast } from 'antd-mobile'
|
|
|
import { cutUnityFu, unityShow } from './data'
|
|
|
import Zloding from '@/components/Zloding'
|
|
|
import { toEchPageFu } from '@/components/MenuSider/data'
|
|
|
+import Zclose from '@/components/Zclose'
|
|
|
|
|
|
function A0base() {
|
|
|
const [loding, setLoding] = useState(false)
|
|
|
@@ -30,6 +30,17 @@ function A0base() {
|
|
|
window.location.replace(path)
|
|
|
}
|
|
|
|
|
|
+ const xianDaoRef = useRef<HTMLVideoElement>(null)
|
|
|
+ const [xianDao, setXianDao] = useState(false)
|
|
|
+
|
|
|
+ useEffect(() => {
|
|
|
+ if (xianDao) {
|
|
|
+ setTimeout(() => {
|
|
|
+ if (xianDaoRef.current) xianDaoRef.current.play()
|
|
|
+ }, 200)
|
|
|
+ }
|
|
|
+ }, [xianDao])
|
|
|
+
|
|
|
return (
|
|
|
<div className={classNames(myLangue === 'ZH' ? '' : styles.A0baseEn, styles.A0base)}>
|
|
|
<Zloding isShow={loding} bacNum={1} />
|
|
|
@@ -104,17 +115,29 @@ function A0base() {
|
|
|
</div>
|
|
|
|
|
|
{/* 先导片 */}
|
|
|
- <div
|
|
|
- className='guideVideo'
|
|
|
- onClick={() => {
|
|
|
- Toast.show({
|
|
|
- content: '正在开发中'
|
|
|
- })
|
|
|
- }}
|
|
|
- >
|
|
|
+ <div className='guideVideo' onClick={() => setXianDao(true)}>
|
|
|
<img src={require('@/assets/img/guideVideo.png')} alt='' />
|
|
|
<div className='guideVideoTitle'>{myLangue === 'EN' ? 'PromotionalVideo' : '先导片'}</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ {/* 先导片播放 */}
|
|
|
+ {xianDao ? (
|
|
|
+ <div className='xiandaoBox'>
|
|
|
+ <video
|
|
|
+ ref={xianDaoRef}
|
|
|
+ playsInline
|
|
|
+ muted={false}
|
|
|
+ webkit-playsinline='true'
|
|
|
+ x5-video-player-type='h5'
|
|
|
+ // controls={true}
|
|
|
+ >
|
|
|
+ <source type='video/mp4' src={'./myData/xianDao.mp4'} />
|
|
|
+ Your browser does not support the video tag.
|
|
|
+ </video>
|
|
|
+
|
|
|
+ <Zclose clickFu={() => setXianDao(false)} />
|
|
|
+ </div>
|
|
|
+ ) : null}
|
|
|
</div>
|
|
|
)
|
|
|
}
|