shaogen1995 vor 8 Monaten
Ursprung
Commit
1d3dcaac13

+ 0 - 40
Code/public/myData/hot.js

@@ -375,11 +375,6 @@ const myHotInfo = {
         ath: 25 // 水平方向(先随便填,尽量保证不相同)
       },
 
-      // 热点定位百分比(更多模块的定位--不需要在更多模块中展示的---删掉)
-      locMore: {
-        top: '0%',
-        left: '0%'
-      },
       // 详细热点信息
       data: {
         //一级介绍,一段用 <p></p> 包起来
@@ -424,11 +419,6 @@ const myHotInfo = {
         ath: 0 // 水平方向(先随便填,尽量保证不相同)
       },
 
-      // 热点定位百分比(更多模块的定位--不需要在更多模块中展示的---删掉)
-      locMore: {
-        top: '0%',
-        left: '0%'
-      },
       // 详细热点信息
       data: {
         //一级介绍,一段用 <p></p> 包起来
@@ -479,11 +469,6 @@ const myHotInfo = {
         ath: 30 // 水平方向(先随便填,尽量保证不相同)
       },
 
-      // 热点定位百分比(更多模块的定位--不需要在更多模块中展示的---删掉)
-      locMore: {
-        top: '0%',
-        left: '0%'
-      },
       // 详细热点信息
       data: {
         //一级介绍,一段用 <p></p> 包起来
@@ -538,11 +523,6 @@ const myHotInfo = {
         ath: 35 // 水平方向(先随便填,尽量保证不相同)
       },
 
-      // 热点定位百分比(更多模块的定位--不需要在更多模块中展示的---删掉)
-      locMore: {
-        top: '0%',
-        left: '0%'
-      },
       // 详细热点信息
       data: {
         //一级介绍,一段用 <p></p> 包起来
@@ -584,11 +564,6 @@ const myHotInfo = {
         ath: 40 // 水平方向(先随便填,尽量保证不相同)
       },
 
-      // 热点定位百分比(更多模块的定位--不需要在更多模块中展示的---删掉)
-      locMore: {
-        top: '0%',
-        left: '0%'
-      },
       // 详细热点信息
       data: {
         //一级介绍,一段用 <p></p> 包起来
@@ -697,11 +672,6 @@ const myHotInfo = {
         ath: 45 // 水平方向(先随便填,尽量保证不相同)
       },
 
-      // 热点定位百分比(更多模块的定位--不需要在更多模块中展示的---删掉)
-      locMore: {
-        top: '0%',
-        left: '0%'
-      },
       // 详细热点信息
       data: {
         //一级介绍,一段用 <p></p> 包起来
@@ -740,11 +710,6 @@ const myHotInfo = {
         ath: 50 // 水平方向(先随便填,尽量保证不相同)
       },
 
-      // 热点定位百分比(更多模块的定位--不需要在更多模块中展示的---删掉)
-      locMore: {
-        top: '0%',
-        left: '0%'
-      },
       // 详细热点信息
       data: {
         //一级介绍,一段用 <p></p> 包起来
@@ -863,11 +828,6 @@ const myHotInfo = {
         ath: 55 // 水平方向(先随便填,尽量保证不相同)
       },
 
-      // 热点定位百分比(更多模块的定位--不需要在更多模块中展示的---删掉)
-      locMore: {
-        top: '0%',
-        left: '0%'
-      },
       // 详细热点信息
       data: {
         //一级介绍,一段用 <p></p> 包起来

+ 1 - 1
Code/src/components/ZHot0/index.module.scss

@@ -4,7 +4,7 @@
   left: 0;
   width: 100%;
   height: 100%;
-  z-index: 20;
+  z-index: 9990;
   background-size: 100% 100%;
   transition: all 0.3s;
   padding: 6% 12% 4% 12%;

+ 2 - 1
Code/src/components/Zhot/index.module.scss

@@ -7,7 +7,7 @@
   background-color: rgba(0, 0, 0, 0.4);
   backdrop-filter: blur(4px);
 
-  z-index: 9999;
+  z-index: 9990;
   display: flex;
   :global {
     // 所有图片盒子
@@ -66,6 +66,7 @@
       .ZH1main {
         background-size: 100% 100%;
         background-color: rgba(242, 242, 215, 0.3);
+        // backdrop-filter: blur(40px);
         width: 100%;
         height: calc(100% - 50px);
         display: flex;

+ 4 - 4
Code/src/pages/A2visit/PanoVideo/index.tsx

@@ -7,9 +7,9 @@ import { KrpanoMiddleware, KrpanoMiddlewareMethods } from '@/components/KrpanoMi
 import ZHot0 from '@/components/ZHot0'
 import Zhot from '@/components/Zhot'
 
-// window.draggbleHotspotEvent = (ath: number, atv: number) => {
-//   console.log(`ath: ${ath}, atv: ${atv}`)
-// }
+window.draggbleHotspotEvent = (ath: number, atv: number) => {
+  console.log(`ath: ${ath}, atv: ${atv}`)
+}
 
 type Propr = {
   lodingOk: () => void
@@ -86,7 +86,7 @@ function PanoVideo({ lodingOk }: Propr) {
                 onOut={() => setActiveIdx(-1)}
                 onClick={() => setAcName(item.name)}
                 // @ts-ignore
-                // onDown='draggable_hotspot()'
+                onDown='draggable_hotspot()'
               >
                 <HotIcon
                   isModel={item.tubiao === '文物' ? true : false}

+ 10 - 9
Code/src/pages/A2visit2/A22Pano/index.tsx

@@ -4,14 +4,16 @@ import { hotInfo, otherUrl } from '@/utils/http'
 import { HotSpot, Krpano, Scene, View } from '@dage/krpano'
 import HotIcon from '@/components/HotIcon'
 import { KrpanoMiddleware } from '@/components/KrpanoMiddleware'
-import Zhot from '@/components/Zhot'
 
-// window.draggbleHotspotEvent = (ath: number, atv: number) => {
-//   console.log(`ath: ${ath}, atv: ${atv}`)
-// }
+window.draggbleHotspotEvent = (ath: number, atv: number) => {
+  console.log(`ath: ${ath}, atv: ${atv}`)
+}
+
+type Props = {
+  setAcName: (val: string) => void
+}
 
-function A22Pano() {
-  const [acName, setAcName] = useState('')
+function A22Pano({ setAcName }: Props) {
   const [activeIdx, setActiveIdx] = useState(-1)
 
   return (
@@ -40,6 +42,7 @@ function A22Pano() {
             ]}
           >
             <View hlookat={0} vlookat={0} fovType='MFOV' fov={120} fovMin={70} fovMax={130} />
+            {/* 待完善位置 */}
             {hotInfo.cheQi2.map((item, index) => (
               // 热点图标
               <HotSpot
@@ -56,7 +59,7 @@ function A22Pano() {
                 onOut={() => setActiveIdx(-1)}
                 onClick={() => setAcName(item.name)}
                 // @ts-ignore
-                // onDown='draggable_hotspot()'
+                onDown='draggable_hotspot()'
               >
                 <HotIcon
                   isModel={item.tubiao === '文物' ? true : false}
@@ -71,8 +74,6 @@ function A22Pano() {
           </Scene>
         </Krpano>
       </KrpanoMiddleware>
-
-      {acName ? <Zhot name={acName} closeFu={() => setAcName('')} /> : null}
     </div>
   )
 }

+ 8 - 1
Code/src/pages/A2visit2/index.tsx

@@ -12,6 +12,7 @@ import classNames from 'classnames'
 import history from '@/utils/history'
 import { renClickPageFu } from '../B1more/data'
 import ZHot0 from '@/components/ZHot0'
+import Zhot from '@/components/Zhot'
 
 function A2visit2() {
   const [loding, setLoding] = useState(myData.isLdong ? 0 : 100)
@@ -56,6 +57,9 @@ function A2visit2() {
   // 点击周礼9拜打开热点
   const [hotShow, setHotShow] = useState(false)
 
+  // 打开其他热点
+  const [acName, setAcName] = useState('')
+
   return (
     <div className={styles.A2visit2}>
       {window.location.href.includes('?v=v2') ? null : (
@@ -159,7 +163,7 @@ function A2visit2() {
       {/* 全景图页面 */}
       {window.location.href.includes('r=ren') ? null : (
         <div className='A22Pano' style={{ opacity: panoShow ? '1' : '0' }}>
-          <A22Pano />
+          <A22Pano setAcName={val => setAcName(val)} />
           {/* 进入室内 */}
           <NextPage clickSon={() => setToShi(true)} txt='进入室内' />
 
@@ -268,7 +272,10 @@ function A2visit2() {
         delDom='.A22Pano'
       />
 
+      {/* 热点相关 */}
       {hotShow ? <ZHot0 closeFu={() => setHotShow(false)} /> : null}
+
+      {acName ? <Zhot name={acName} closeFu={() => setAcName('')} /> : null}
     </div>
   )
 }