|
@@ -6,6 +6,7 @@ import classNames from 'classnames'
|
|
|
import { domDelOwnFu } from '@/utils/utilsSome'
|
|
|
import { ArrowRightOutlined } from '@ant-design/icons'
|
|
|
import history from '@/utils/history'
|
|
|
+import Hot2 from '../A2visit/PanoVideo/Hot2'
|
|
|
|
|
|
function A4dance() {
|
|
|
const { dataUrlSame } = useDataUrl()
|
|
@@ -83,15 +84,19 @@ function A4dance() {
|
|
|
|
|
|
const hotVideoRef = useRef<HTMLVideoElement>(null)
|
|
|
|
|
|
- const [hotShow, setHotShow] = useState(false)
|
|
|
+ const [hotInd, setHotInd] = useState(-1)
|
|
|
|
|
|
- const hotShowFu = useCallback(() => {
|
|
|
- setHotShow(true)
|
|
|
- setTimeout(() => {
|
|
|
- if (hotVideoRef.current) {
|
|
|
- hotVideoRef.current.play()
|
|
|
- }
|
|
|
- }, 100)
|
|
|
+ const hotShowFu = useCallback((index: number) => {
|
|
|
+ setHotInd(index)
|
|
|
+
|
|
|
+ // 第一个热点 云气图 其他是通用热点
|
|
|
+ if (index === 0) {
|
|
|
+ setTimeout(() => {
|
|
|
+ if (hotVideoRef.current) {
|
|
|
+ hotVideoRef.current.play()
|
|
|
+ }
|
|
|
+ }, 100)
|
|
|
+ }
|
|
|
}, [])
|
|
|
|
|
|
return (
|
|
@@ -129,12 +134,14 @@ function A4dance() {
|
|
|
{/* 热点 云气图*/}
|
|
|
{myData.dance.hot.map((item, index) => (
|
|
|
<div
|
|
|
- onClick={hotShowFu}
|
|
|
+ onClick={() => hotShowFu(index)}
|
|
|
key={index}
|
|
|
className='pvHot hoverD'
|
|
|
style={{
|
|
|
top: item.loc.top,
|
|
|
- right: item.loc.right
|
|
|
+ right: item.loc.right,
|
|
|
+ bottom: item.loc.bottom,
|
|
|
+ left: item.loc.left
|
|
|
}}
|
|
|
>
|
|
|
<img src={dataUrlSame + item.imgSrc} alt='' />
|
|
@@ -215,7 +222,7 @@ function A4dance() {
|
|
|
</div>
|
|
|
|
|
|
{/* 点击四神云气图的动画 */}
|
|
|
- <div className={classNames('A4hotBox', hotShow ? 'A4hotBoxShow' : '')}>
|
|
|
+ <div className={classNames('A4hotBox', hotInd === 0 ? 'A4hotBoxShow' : '')}>
|
|
|
<video
|
|
|
ref={hotVideoRef}
|
|
|
playsInline
|
|
@@ -230,6 +237,18 @@ function A4dance() {
|
|
|
</video>
|
|
|
</div>
|
|
|
|
|
|
+ {/* 点击其他热点 */}
|
|
|
+
|
|
|
+ {hotInd > 0 ? (
|
|
|
+ <div className={'A4othHot'}>
|
|
|
+ <Hot2
|
|
|
+ data={myData.dance.hot[hotInd].data}
|
|
|
+ closeFu={() => setHotInd(-1)}
|
|
|
+ name={myData.dance.hot[hotInd].name}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ ) : null}
|
|
|
+
|
|
|
{/* 最后一个过长动画 */}
|
|
|
<div className={classNames('A4last', lastVideo ? 'A4lastShow' : '')}>
|
|
|
<video
|
|
@@ -245,12 +264,11 @@ function A4dance() {
|
|
|
Your browser does not support the video tag.
|
|
|
</video>
|
|
|
<div
|
|
|
+ title='跳过'
|
|
|
className='A3videoLastBtn'
|
|
|
- style={{ backgroundImage: `url(${dataUrlSame}home/quan.png)` }}
|
|
|
+ style={{ backgroundImage: `url(${dataUrlSame}home/tiao.png)` }}
|
|
|
onClick={() => history.push('/chef')}
|
|
|
- >
|
|
|
- 跳过
|
|
|
- </div>
|
|
|
+ ></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
)
|