shaogen1995 недель назад: 4
Родитель
Сommit
b1c9473ee0

+ 5 - 2
public/unityMo/export_main.js

@@ -14,9 +14,12 @@ window.setLoadSceneAnimationTime = function (animationTime) {
 
 //切换场景 场景支持以下参数 "TombstoneView", "RoomScene", "DrawingBoard"
 window.loadScene = function (sceneName) {
-  window.setLoadSceneAnimationTime(sceneName === 'DrawingBoard' ? 1 : 0)
-  window.unityInstance.SendMessage('SceneLoader', 'LoadScene', sceneName)
   currentScene = sceneName
+
+  if (sceneName) {
+    window.setLoadSceneAnimationTime(sceneName === 'DrawingBoard' ? 1 : 0)
+    window.unityInstance.SendMessage('SceneLoader', 'LoadScene', sceneName)
+  }
 }
 
 // 返回当前场景状态

+ 4 - 2
public/unityPc/export_main.js

@@ -14,9 +14,11 @@ window.setLoadSceneAnimationTime = function (animationTime) {
 
 //切换场景 场景支持以下参数 "TombstoneView", "RoomScene", "DrawingBoard"
 window.loadScene = function (sceneName) {
-  window.setLoadSceneAnimationTime(sceneName === 'DrawingBoard' ? 1 : 0)
-  window.unityInstance.SendMessage('SceneLoader', 'LoadScene', sceneName)
   currentScene = sceneName
+  if (sceneName) {
+    window.setLoadSceneAnimationTime(sceneName === 'DrawingBoard' ? 1 : 0)
+    window.unityInstance.SendMessage('SceneLoader', 'LoadScene', sceneName)
+  }
 }
 
 // 返回当前场景状态

+ 1 - 9
src/pages/A0base/data.ts

@@ -45,7 +45,7 @@ export const cutUnityFu = (
   backFu: () => void
 ) => {
   const dom: any = document.getElementById('modalIframe')
-  
+
   if (dom.src.includes('unity')) {
     const res = getUnityKey()
 
@@ -59,11 +59,3 @@ export const cutUnityFu = (
     // lodingUnityFu()
   }
 }
-
-// 重新加载unity
-// export const lodingUnityAgainFu = () => {
-//   const rootDom = document.querySelector('#root') as HTMLDivElement
-//   if (rootDom) {
-
-//   }
-// }

+ 5 - 5
src/pages/A2yblm/index.tsx

@@ -109,11 +109,11 @@ function A2yblm() {
             ''
           ) : (
             <>
-              
+              碑
               <br />
             </>
           )}
-          {myLangue === 'EN' ? 'Introduction' : '简介'}
+          {myLangue === 'EN' ? 'Introduction' : '概览'}
         </div>
         <div
           className={`tab songFont ${currentTab === 'tab2' ? 'tab_active' : ''}`}
@@ -127,7 +127,7 @@ function A2yblm() {
               <br />
             </>
           )}
-          {myLangue === 'EN' ? 'Appreciation' : '析'}
+          {myLangue === 'EN' ? 'Appreciation' : '析'}
         </div>
         <div
           className={`tab songFont ${currentTab === 'tab3' ? 'tab_active' : ''}`}
@@ -137,11 +137,11 @@ function A2yblm() {
             ''
           ) : (
             <>
-              
+              文
               <br />
             </>
           )}
-          {myLangue === 'EN' ? 'Interpretation' : '解读'}
+          {myLangue === 'EN' ? 'Interpretation' : '释义'}
         </div>
       </div>
 

+ 0 - 7
src/pages/A7wjwj/conponents/Discover/index.tsx

@@ -4,16 +4,9 @@ import { isPc } from '@/utils/http'
 import classNames from 'classnames'
 import { useSelector } from 'react-redux'
 import { RootState } from '@/store'
-// import { cutUnityFu } from '@/pages/A0base/data'
 // import { domDelOwnFu } from '@/utils/utilsSome'
 
 function Discover(props: { style?: React.CSSProperties }) {
-
-  // 待完善 这个时候应该跳空场景
-  useEffect(()=>{
-    // cutUnityFu()
-  },[])
-
   const { myData } = useSelector((state: RootState) => state.A0Layout)
 
   // 将隐藏的页面打开,全景图->诗歌->大场景