|
|
@@ -57,12 +57,14 @@ function A1home() {
|
|
|
window.location.replace('#/base')
|
|
|
}, // 触发播放结束事件
|
|
|
onSourceEstablished: () => {
|
|
|
- setVideo2Flag(true)
|
|
|
+ setTimeout(() => {
|
|
|
+ setVideo2Flag(true)
|
|
|
+ }, 500)
|
|
|
} //有足够的数据可以播放了
|
|
|
}
|
|
|
playerRef.current = F_Video('./myData/home.ts', params)
|
|
|
- const dom = document.querySelector('.A1videoBox')!
|
|
|
- dom.append(playerRef.current.domElement)
|
|
|
+ const dom = document.querySelector('.A1videoBox')
|
|
|
+ if (dom) dom.append(playerRef.current.domElement)
|
|
|
}
|
|
|
}, [baseFlag])
|
|
|
|
|
|
@@ -72,7 +74,6 @@ function A1home() {
|
|
|
if (modalIframe) {
|
|
|
modalIframe.style.display = 'block'
|
|
|
modalIframe.src = 'Chenzhebei-ShanxiMuseum/index.html'
|
|
|
- modalIframe.loading = 'lazy'
|
|
|
}
|
|
|
window.unityLoading = (progress: number) => {
|
|
|
clearInterval(timeRef.current)
|
|
|
@@ -99,14 +100,17 @@ function A1home() {
|
|
|
{baseFlag ? (
|
|
|
<div className='Aloding'>
|
|
|
<div className='AlodingT'>
|
|
|
- <div style={{ width: `${loding}%` }}></div>
|
|
|
+ <div className='AlodingT1' style={{ width: `${loding}%` }}></div>
|
|
|
+ <img className='AlodingT2' style={{left: `${loding}%`}} src={require('@/assets/sgImg/icon_skip.png')} alt="" />
|
|
|
</div>
|
|
|
</div>
|
|
|
) : null}
|
|
|
|
|
|
<div className={classNames('A1video', loding >= 100 ? 'A1videoShow' : '')}>
|
|
|
<div className='A1videoBox'></div>
|
|
|
- <div className='A1videoBtn' onClick={()=>window.location.replace('#/base')}>跳过</div>
|
|
|
+ <div className='A1videoBtn' onClick={() => window.location.replace('#/base')}>
|
|
|
+ 跳过
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
)
|