|
|
@@ -11,28 +11,17 @@ 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)
|
|
|
}
|
|
|
|
|
|
@@ -72,19 +61,21 @@ function A0base() {
|
|
|
<Zloding isShow={loding} bacNum={1} />
|
|
|
|
|
|
<div className='A0baseContainner' id='opacityCss'>
|
|
|
- <div className={`content`}>
|
|
|
- <div className={`title ${isChanging ? 'titleAc' : 'titleAni'} songFontc`}>
|
|
|
- {myData.baseInfo[currentBase].title}
|
|
|
+ {myData.baseInfo.map((item, index) => (
|
|
|
+ <div className={`content ${currentBase === index ? 'contentShow' : 'contentHide'}`} key={index}>
|
|
|
+ <div className={`title songFontc`}>
|
|
|
+ {item.title}
|
|
|
+ </div>
|
|
|
+ <div className={`text`}>{item.text}</div>
|
|
|
+ <div
|
|
|
+ className='btn songFontc'
|
|
|
+ id='opacityChange'
|
|
|
+ onClick={e => goto(e, item.path)}
|
|
|
+ >
|
|
|
+ {myLangue === 'ZH' ? '进入单元' : 'view details'}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div className={`text ${isChanging ? 'textAc' : 'textAni'} `}>{myData.baseInfo[currentBase].text}</div>
|
|
|
- <div
|
|
|
- className='btn songFontc'
|
|
|
- id='opacityChange'
|
|
|
- onClick={e => goto(e, myData.baseInfo[currentBase].path)}
|
|
|
- >
|
|
|
- {myLangue === 'ZH' ? '进入单元' : 'view details'}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ ))}
|
|
|
<div className='baseContent'>
|
|
|
<div
|
|
|
className={`base songFontc ${currentBase === 0 ? 'baseAc' : ''}`}
|