|
|
@@ -11,16 +11,31 @@ import { baseUrl } from '@/utils/http'
|
|
|
|
|
|
function A0base() {
|
|
|
const [loding, setLoding] = useState(false)
|
|
|
+ const [isChanging, setIsChanging] = useState(false)
|
|
|
|
|
|
useEffect(() => {
|
|
|
// 切换场景
|
|
|
cutUnityFu('TombstoneView', () => setLoding(true))
|
|
|
}, [])
|
|
|
|
|
|
+
|
|
|
+
|
|
|
const { myData, myLangue, videos } = useSelector((state: RootState) => state.A0Layout)
|
|
|
|
|
|
const [currentBase, setCurrentBase] = useState(0)
|
|
|
|
|
|
+
|
|
|
+ const onClickBase = (index: number) => {
|
|
|
+ // setIsChanging(true)
|
|
|
+ // setTimeout(() => {
|
|
|
+ // setCurrentBase(index)
|
|
|
+ // setTimeout(() => {
|
|
|
+ // setIsChanging(false)
|
|
|
+ // }, 200)
|
|
|
+ // }, 200)
|
|
|
+ setCurrentBase(index)
|
|
|
+ }
|
|
|
+
|
|
|
// 从二三单元返回
|
|
|
useEffect(() => {
|
|
|
const urlAll = window.location.href
|
|
|
@@ -58,8 +73,10 @@ function A0base() {
|
|
|
|
|
|
<div className='A0baseContainner' id='opacityCss'>
|
|
|
<div className={`content`}>
|
|
|
- <div className='title songFontc'>{myData.baseInfo[currentBase].title}</div>
|
|
|
- <div className='text'>{myData.baseInfo[currentBase].text}</div>
|
|
|
+ <div className={`title ${isChanging ? 'titleAc' : 'titleAni'} songFontc`}>
|
|
|
+ {myData.baseInfo[currentBase].title}
|
|
|
+ </div>
|
|
|
+ <div className={`text ${isChanging ? 'textAc' : 'textAni'} songFontc`}>{myData.baseInfo[currentBase].text}</div>
|
|
|
<div
|
|
|
className='btn'
|
|
|
id='opacityChange'
|
|
|
@@ -71,19 +88,19 @@ function A0base() {
|
|
|
<div className='baseContent'>
|
|
|
<div
|
|
|
className={`base songFontc ${currentBase === 0 ? 'baseAc' : ''}`}
|
|
|
- onClick={() => setCurrentBase(0)}
|
|
|
+ onClick={() => onClickBase(0)}
|
|
|
>
|
|
|
{myData.baseInfo[0].title}
|
|
|
</div>
|
|
|
<div
|
|
|
className={`base songFontc ${currentBase === 1 ? 'baseAc' : ''}`}
|
|
|
- onClick={() => setCurrentBase(1)}
|
|
|
+ onClick={() => onClickBase(1)}
|
|
|
>
|
|
|
{myData.baseInfo[1].title}
|
|
|
</div>
|
|
|
<div
|
|
|
className={`base songFontc ${currentBase === 2 ? 'baseAc' : ''}`}
|
|
|
- onClick={() => setCurrentBase(2)}
|
|
|
+ onClick={() => onClickBase(2)}
|
|
|
>
|
|
|
{myData.baseInfo[2].title}
|
|
|
</div>
|
|
|
@@ -144,7 +161,7 @@ function A0base() {
|
|
|
muted={false}
|
|
|
webkit-playsinline='true'
|
|
|
x5-video-player-type='h5'
|
|
|
- // controls={true}
|
|
|
+ // controls={true}
|
|
|
>
|
|
|
<source
|
|
|
type='video/mp4'
|