|
|
@@ -9,7 +9,7 @@ import { isPc } from '@/utils/http'
|
|
|
import MenuSider from '@/components/MenuSider'
|
|
|
import Skip from '@/components/Skip'
|
|
|
import { domDelOwnFu } from '@/utils/utilsSome'
|
|
|
-import { cutUnityFu } from '../A0base/data'
|
|
|
+import { cutUnityFu, getUnityKey } from '../A0base/data'
|
|
|
import Zloding from '@/components/Zloding'
|
|
|
|
|
|
function A6ybwx() {
|
|
|
@@ -18,6 +18,16 @@ function A6ybwx() {
|
|
|
|
|
|
const [isEnter, setIsEnter] = useState(false)
|
|
|
|
|
|
+ // 是否还需要重新加载场景
|
|
|
+ const [lodingScene, setLodingScene] = useState(true)
|
|
|
+
|
|
|
+ useEffect(() => {
|
|
|
+ const unityKey = getUnityKey()
|
|
|
+ if (unityKey === 'RoomScene') {
|
|
|
+ setLodingScene(false)
|
|
|
+ }
|
|
|
+ }, [])
|
|
|
+
|
|
|
useEffect(() => {
|
|
|
if (videoRefLast.current) videoRefLast.current.play()
|
|
|
}, [])
|
|
|
@@ -65,11 +75,11 @@ function A6ybwx() {
|
|
|
if (isEnter) {
|
|
|
// 销毁视频
|
|
|
videoRefLast.current?.pause()
|
|
|
- setTimeout(()=>{
|
|
|
+ setTimeout(() => {
|
|
|
domDelOwnFu('.videoBox')
|
|
|
- },100)
|
|
|
+ }, 100)
|
|
|
// 切换场景
|
|
|
- cutUnityFu('RoomScene',()=>{})
|
|
|
+ cutUnityFu('RoomScene', () => {})
|
|
|
}
|
|
|
}, [isEnter])
|
|
|
|
|
|
@@ -127,7 +137,7 @@ function A6ybwx() {
|
|
|
{gotoTab === 3 && <SangzangHome setGotoTab={setGotoTab} />}
|
|
|
|
|
|
{/* 进度条 */}
|
|
|
- <Zloding isShow={isEnter} bacNum={2} />
|
|
|
+ <Zloding isShow={isEnter&&lodingScene} bacNum={2} />
|
|
|
</div>
|
|
|
)
|
|
|
}
|