|
@@ -1,15 +1,13 @@
|
|
|
import React, { useEffect, useRef, useState } from 'react'
|
|
import React, { useEffect, useRef, useState } from 'react'
|
|
|
import styles from './index.module.scss'
|
|
import styles from './index.module.scss'
|
|
|
import MenuSider from '@/components/MenuSider'
|
|
import MenuSider from '@/components/MenuSider'
|
|
|
-import { callIframeFu } from '@/utils/history'
|
|
|
|
|
|
|
+import history, { callIframeFu } from '@/utils/history'
|
|
|
import PanoHot from './PanoHot'
|
|
import PanoHot from './PanoHot'
|
|
|
import { baseOssUrl } from '@/utils/http'
|
|
import { baseOssUrl } from '@/utils/http'
|
|
|
function A1home() {
|
|
function A1home() {
|
|
|
const [isOpenPano, setIsOpenPano] = useState(false)
|
|
const [isOpenPano, setIsOpenPano] = useState(false)
|
|
|
const [isShowDetail, setIsShowDetail] = useState(false)
|
|
const [isShowDetail, setIsShowDetail] = useState(false)
|
|
|
const [currentSceneIndex, setCurrentSceneIndex] = useState(0)
|
|
const [currentSceneIndex, setCurrentSceneIndex] = useState(0)
|
|
|
- // 是否进入二级页面
|
|
|
|
|
- const [isHotPano, setIsHotPano] = useState(false)
|
|
|
|
|
const [activeIndex, setActiveIndex] = useState(-1)
|
|
const [activeIndex, setActiveIndex] = useState(-1)
|
|
|
|
|
|
|
|
const scrollRef = useRef<HTMLDivElement>(null)
|
|
const scrollRef = useRef<HTMLDivElement>(null)
|
|
@@ -18,8 +16,8 @@ function A1home() {
|
|
|
const totalScenes = sceneList.length
|
|
const totalScenes = sceneList.length
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
- window.setIsHotPano = (isHotPano: boolean) => {
|
|
|
|
|
- setIsHotPano(isHotPano)
|
|
|
|
|
|
|
+ window.gotoScene = () => {
|
|
|
|
|
+ history.push('/scene')
|
|
|
}
|
|
}
|
|
|
window.setActiveHotId = (id: string) => {
|
|
window.setActiveHotId = (id: string) => {
|
|
|
console.log('setActiveHotId222', id)
|
|
console.log('setActiveHotId222', id)
|
|
@@ -117,23 +115,22 @@ function A1home() {
|
|
|
<>
|
|
<>
|
|
|
<iframe
|
|
<iframe
|
|
|
id='panoIframe'
|
|
id='panoIframe'
|
|
|
- src='https://houseoss.4dkankan.com/project/gmlx/Pano/index.html'
|
|
|
|
|
|
|
+ src='https://houseoss.4dkankan.com/project/gmlx/Pano/index.html'
|
|
|
title='pono'
|
|
title='pono'
|
|
|
></iframe>
|
|
></iframe>
|
|
|
{activeIndex !== -1 && (
|
|
{activeIndex !== -1 && (
|
|
|
<PanoHot activeIndex={activeIndex} setActiveIndex={setActiveIndex} />
|
|
<PanoHot activeIndex={activeIndex} setActiveIndex={setActiveIndex} />
|
|
|
)}
|
|
)}
|
|
|
- {/* 详情按钮-只在二级页面显示 */}
|
|
|
|
|
- {isHotPano && (
|
|
|
|
|
- <div className={styles.skipBtn} onClick={() => setIsShowDetail(!isShowDetail)}>
|
|
|
|
|
- <img
|
|
|
|
|
- src={require(`@/assets/img/${isShowDetail ? 'detail_ac' : 'detail'}.png`)}
|
|
|
|
|
- alt=''
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- )}
|
|
|
|
|
|
|
+
|
|
|
|
|
+ {/* <div className={styles.skipBtn} onClick={() => setIsShowDetail(!isShowDetail)}>
|
|
|
|
|
+ <img
|
|
|
|
|
+ src={require(`@/assets/img/${isShowDetail ? 'detail_ac' : 'detail'}.png`)}
|
|
|
|
|
+ alt=''
|
|
|
|
|
+ />
|
|
|
|
|
+ </div> */}
|
|
|
|
|
+
|
|
|
{/* 场景列表=由详情按钮控制 */}
|
|
{/* 场景列表=由详情按钮控制 */}
|
|
|
- <div className={`${styles.detailContent} ${isShowDetail ? 'show' : ''}`}>
|
|
|
|
|
|
|
+ {/* <div className={`${styles.detailContent} ${isShowDetail ? 'show' : ''}`}>
|
|
|
<img
|
|
<img
|
|
|
className={styles.arrowLeft}
|
|
className={styles.arrowLeft}
|
|
|
src={require(`@/assets/img/arrow_left.png`)}
|
|
src={require(`@/assets/img/arrow_left.png`)}
|
|
@@ -160,7 +157,7 @@ function A1home() {
|
|
|
alt=''
|
|
alt=''
|
|
|
onClick={handleNext}
|
|
onClick={handleNext}
|
|
|
/>
|
|
/>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> */}
|
|
|
</>
|
|
</>
|
|
|
) : (
|
|
) : (
|
|
|
<>
|
|
<>
|
|
@@ -172,7 +169,7 @@ function A1home() {
|
|
|
muted
|
|
muted
|
|
|
className={styles.bgVideo}
|
|
className={styles.bgVideo}
|
|
|
/> */}
|
|
/> */}
|
|
|
- <div className="baseVideo"></div>
|
|
|
|
|
|
|
+ <div className='baseVideo'></div>
|
|
|
|
|
|
|
|
{/* 跳过按钮 */}
|
|
{/* 跳过按钮 */}
|
|
|
<div className={styles.skipBtn} onClick={() => setIsOpenPano(true)}>
|
|
<div className={styles.skipBtn} onClick={() => setIsOpenPano(true)}>
|