|
@@ -1,16 +1,15 @@
|
|
|
import React, { useCallback, useEffect, useState } from 'react'
|
|
|
import styles from './index.module.scss'
|
|
|
-import { baseURL, myData } from '@/utils/http'
|
|
|
+import { baseURL, hotInfo, myData } from '@/utils/http'
|
|
|
import classNames from 'classnames'
|
|
|
-import Hot2 from '../A2visit/PanoVideo/Hot2'
|
|
|
import EndVideo from '@/components/EndVideo'
|
|
|
import BaseImg from '@/components/BaseImg'
|
|
|
import FloorBtn from '@/components/FloorBtn'
|
|
|
import NextPage from '@/components/NextPage'
|
|
|
import useLoding from '@/components/ownUse/useLoding'
|
|
|
-import history from '@/utils/history'
|
|
|
import BtnRight from '@/components/BtnRight'
|
|
|
import VideoModel from '@/components/VideoModel'
|
|
|
+import Zhot from '@/components/Zhot'
|
|
|
|
|
|
function A4dance() {
|
|
|
const [baseSta, setBaseSta] = useState(window.location.href.includes('r=ren') ? true : false)
|
|
@@ -43,14 +42,8 @@ function A4dance() {
|
|
|
}
|
|
|
}, [floorAc])
|
|
|
|
|
|
- const [hotInd, setHotInd] = useState(-1)
|
|
|
-
|
|
|
- const hotShowFu = useCallback((index: number) => {
|
|
|
- if (index === 0) {
|
|
|
- // 云气图 直接跳页面
|
|
|
- history.push('/yun')
|
|
|
- } else setHotInd(index)
|
|
|
- }, [])
|
|
|
+ //新 热点
|
|
|
+ const [acName, setAcName] = useState('')
|
|
|
|
|
|
// 先加载背景图 序列帧等 在加载视频
|
|
|
const { imgNow, imgNumFu } = useLoding(2)
|
|
@@ -80,31 +73,17 @@ function A4dance() {
|
|
|
baseSta ? 'pvBoxShow' : 'pvBoxHide'
|
|
|
)}
|
|
|
>
|
|
|
- {/* 热点图标 云气图为第一个*/}
|
|
|
- {myData.dance.hot.map(
|
|
|
- (item, index) =>
|
|
|
- item.name === '汉代乐舞百戏' ? (
|
|
|
- <div
|
|
|
- onClick={() => hotShowFu(1)}
|
|
|
- key={index}
|
|
|
- className='A4leftBtn'
|
|
|
- style={{ backgroundImage: `url(${baseURL}chef/chuBtn.png)` }}
|
|
|
- >
|
|
|
- 汉代乐舞百戏
|
|
|
- </div>
|
|
|
- ) : null
|
|
|
- // <HotIcon
|
|
|
- // style={{
|
|
|
- // top: item.locPage.top,
|
|
|
- // left: item.locPage.left
|
|
|
- // }}
|
|
|
- // key={index}
|
|
|
- // index={index}
|
|
|
- // clickSon={val => hotShowFu(val)}
|
|
|
- // hoverSrc={item.hoverSrc}
|
|
|
- // isZhan={true}
|
|
|
- // />
|
|
|
- )}
|
|
|
+ {/* 汉代乐舞百戏*/}
|
|
|
+ {hotInfo.yueWu.map((item, index) => (
|
|
|
+ <div
|
|
|
+ onClick={() => setAcName(item.name)}
|
|
|
+ key={index}
|
|
|
+ className='A4leftBtn'
|
|
|
+ style={{ backgroundImage: `url(${baseURL}chef/chuBtn.png)` }}
|
|
|
+ >
|
|
|
+ 汉代乐舞百戏
|
|
|
+ </div>
|
|
|
+ ))}
|
|
|
|
|
|
{/* 底部 */}
|
|
|
<div className='pvfloor'>
|
|
@@ -198,16 +177,6 @@ function A4dance() {
|
|
|
/>
|
|
|
) : null} */}
|
|
|
|
|
|
- {/* 点击其他热点 */}
|
|
|
- {hotInd > 0 ? (
|
|
|
- <div className={'A4othHot'}>
|
|
|
- <Hot2
|
|
|
- data={myData.dance.hot[hotInd].data}
|
|
|
- closeFu={() => setHotInd(-1)}
|
|
|
- name={myData.dance.hot[hotInd].name}
|
|
|
- />
|
|
|
- </div>
|
|
|
- ) : null}
|
|
|
{/* 结尾动画 */}
|
|
|
{imgNow ? (
|
|
|
<EndVideo
|
|
@@ -217,6 +186,9 @@ function A4dance() {
|
|
|
path='/chef'
|
|
|
/>
|
|
|
) : null}
|
|
|
+
|
|
|
+ {/* 热点 */}
|
|
|
+ {acName ? <Zhot name={acName} closeFu={() => setAcName('')} /> : null}
|
|
|
</div>
|
|
|
)
|
|
|
}
|