|
@@ -1,4 +1,4 @@
|
|
|
-import React, { useCallback, useEffect, useRef, useState } from 'react'
|
|
|
+import React, { useCallback, useEffect, useState } from 'react'
|
|
|
import styles from './index.module.scss'
|
|
|
import { baseURL, myData } from '@/utils/http'
|
|
|
import classNames from 'classnames'
|
|
@@ -40,22 +40,10 @@ function A4dance() {
|
|
|
}
|
|
|
}, [floorAc])
|
|
|
|
|
|
- // 点击 云气图
|
|
|
- const hotVideoRef = useRef<HTMLVideoElement>(null)
|
|
|
-
|
|
|
const [hotInd, setHotInd] = useState(-1)
|
|
|
|
|
|
const hotShowFu = useCallback((index: number) => {
|
|
|
setHotInd(index)
|
|
|
-
|
|
|
- // 第一个热点 云气图 其他是通用热点
|
|
|
- if (index === 0) {
|
|
|
- setTimeout(() => {
|
|
|
- if (hotVideoRef.current) {
|
|
|
- hotVideoRef.current.play()
|
|
|
- }
|
|
|
- }, 100)
|
|
|
- }
|
|
|
}, [])
|
|
|
|
|
|
return (
|
|
@@ -72,18 +60,30 @@ function A4dance() {
|
|
|
)}
|
|
|
>
|
|
|
{/* 热点图标 云气图为第一个*/}
|
|
|
- {myData.dance.hot.map((item, index) => (
|
|
|
- <HotIcon
|
|
|
- style={{
|
|
|
- top: item.loc.top,
|
|
|
- left: item.loc.left
|
|
|
- }}
|
|
|
- key={index}
|
|
|
- index={index}
|
|
|
- clickSon={val => hotShowFu(val)}
|
|
|
- hoverSrc={item.imgSrc}
|
|
|
- />
|
|
|
- ))}
|
|
|
+ {myData.dance.hot.map((item, index) =>
|
|
|
+ item.name === '汉代乐舞百戏' ? (
|
|
|
+ <div
|
|
|
+ onClick={() => hotShowFu(1)}
|
|
|
+ key={index}
|
|
|
+ className='A4leftBtn'
|
|
|
+ style={{ backgroundImage: `url(${baseURL}chef/chuBtn.png)` }}
|
|
|
+ >
|
|
|
+ 汉代乐舞百戏
|
|
|
+ </div>
|
|
|
+ ) : (
|
|
|
+ <HotIcon
|
|
|
+ style={{
|
|
|
+ top: item.locPage.top,
|
|
|
+ left: item.locPage.left
|
|
|
+ }}
|
|
|
+ key={index}
|
|
|
+ index={index}
|
|
|
+ clickSon={val => hotShowFu(val)}
|
|
|
+ hoverSrc={item.hoverSrc}
|
|
|
+ isZhan={true}
|
|
|
+ />
|
|
|
+ )
|
|
|
+ )}
|
|
|
|
|
|
{/* 底部 */}
|
|
|
<div className='pvfloor'>
|
|
@@ -97,7 +97,7 @@ function A4dance() {
|
|
|
<div className='pvflR1'></div>
|
|
|
{/* 底图 */}
|
|
|
<div className='pvflR2'>
|
|
|
- <img src={baseURL + item.imgSrc} alt='' />
|
|
|
+ <img src={baseURL + item.hoverSrc} alt='' />
|
|
|
</div>
|
|
|
|
|
|
{/* 文字 */}
|