|
@@ -1,7 +1,7 @@
|
|
|
import React, { useCallback, useEffect, useRef, useState } from 'react'
|
|
|
import styles from './index.module.scss'
|
|
|
import BaseImg from '@/components/BaseImg'
|
|
|
-import { baseURL, myData } from '@/utils/http'
|
|
|
+import { baseURL, hotInfo, myData } from '@/utils/http'
|
|
|
import useLoding from '@/components/ownUse/useLoding'
|
|
|
import CatVideo from '@/components/CatVideo'
|
|
|
import A6PanoVideo from './A6PanoVideo'
|
|
@@ -11,6 +11,8 @@ import FloorBtn from '@/components/FloorBtn'
|
|
|
import NextPage from '@/components/NextPage'
|
|
|
import EndVideo from '@/components/EndVideo'
|
|
|
import history from '@/utils/history'
|
|
|
+import HotIcon from '@/components/HotIcon'
|
|
|
+import Zhot from '@/components/Zhot'
|
|
|
|
|
|
function A6xian() {
|
|
|
// 过度动画
|
|
@@ -112,6 +114,16 @@ function A6xian() {
|
|
|
// 二级的静态图
|
|
|
const [erImg, setErImg] = useState(false)
|
|
|
|
|
|
+ // 打开热点
|
|
|
+ const [acName, setAcName] = useState('')
|
|
|
+
|
|
|
+ useEffect(() => {
|
|
|
+ if (acName) {
|
|
|
+ clearTimeout(actionRef.current)
|
|
|
+ clearInterval(actionMoveRef.current)
|
|
|
+ } else actionFu()
|
|
|
+ }, [acName, actionFu])
|
|
|
+
|
|
|
return (
|
|
|
<div className={styles.A6xian}>
|
|
|
{/* 初始静态图 */}
|
|
@@ -187,27 +199,45 @@ function A6xian() {
|
|
|
className='A6XimgBox'
|
|
|
style={{ opacity: xianShow ? '1' : '0', pointerEvents: xianShow ? 'auto' : 'none' }}
|
|
|
>
|
|
|
- <div
|
|
|
- className='A6XimgBoxSon'
|
|
|
- style={{ cursor: isFlag ? 'move' : 'default' }}
|
|
|
- ref={xianRef}
|
|
|
- onMouseDown={() => setIsFlag(true)}
|
|
|
- onMouseUp={() => setIsFlag(false)}
|
|
|
- onMouseLeave={() => setIsFlag(false)}
|
|
|
- onMouseMove={e => mousemoveFu(e)}
|
|
|
- onWheel={e => mousemoveFu(e, true)}
|
|
|
- >
|
|
|
- <video
|
|
|
- ref={videoRef}
|
|
|
- playsInline
|
|
|
- muted
|
|
|
- webkit-playsinline='true'
|
|
|
- x5-video-player-type='h5'
|
|
|
- loop={true}
|
|
|
+ <div className='A6XimgBoxSon'>
|
|
|
+ <div
|
|
|
+ className='A6videoBox'
|
|
|
+ style={{ cursor: isFlag ? 'move' : 'default' }}
|
|
|
+ ref={xianRef}
|
|
|
+ onMouseDown={() => setIsFlag(true)}
|
|
|
+ onMouseUp={() => setIsFlag(false)}
|
|
|
+ onMouseLeave={() => setIsFlag(false)}
|
|
|
+ onMouseMove={e => mousemoveFu(e)}
|
|
|
+ onWheel={e => mousemoveFu(e, true)}
|
|
|
>
|
|
|
- <source type='video/mp4' src={`${baseURL}xianJu/chang.mp4`} />
|
|
|
- Your browser does not support the video tag.
|
|
|
- </video>
|
|
|
+ <video
|
|
|
+ ref={videoRef}
|
|
|
+ playsInline
|
|
|
+ muted
|
|
|
+ webkit-playsinline='true'
|
|
|
+ x5-video-player-type='h5'
|
|
|
+ loop={true}
|
|
|
+ >
|
|
|
+ <source type='video/mp4' src={`${baseURL}xianJu/chang.mp4`} />
|
|
|
+ Your browser does not support the video tag.
|
|
|
+ </video>
|
|
|
+
|
|
|
+ {/* 热点 */}
|
|
|
+ {hotInfo.xianJu2.map((item, index) => (
|
|
|
+ <HotIcon
|
|
|
+ isModel={item.tubiao === '文物' ? true : false}
|
|
|
+ style={{
|
|
|
+ top: item.locPage.top,
|
|
|
+ left: item.locPage.left
|
|
|
+ }}
|
|
|
+ key={index}
|
|
|
+ index={index}
|
|
|
+ clickSon={() => setAcName(item.name)}
|
|
|
+ hoverSrc={item.hoverSrc}
|
|
|
+ isXiao={0.67}
|
|
|
+ />
|
|
|
+ ))}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
{/* 跳到下一章 */}
|
|
|
<NextPage clickSon={() => setLastVideo(true)} txt='结束冥想' />
|
|
@@ -229,6 +259,8 @@ function A6xian() {
|
|
|
path='/end'
|
|
|
delDom='.A22Pano'
|
|
|
/>
|
|
|
+
|
|
|
+ {acName ? <Zhot name={acName} closeFu={() => setAcName('')} /> : null}
|
|
|
</div>
|
|
|
)
|
|
|
}
|