Browse Source

修复断线自动重连后的部分bug

liling 4 months ago
parent
commit
00130b0d53
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/pages/main/index.vue

+ 6 - 1
src/pages/main/index.vue

@@ -166,6 +166,7 @@ export default {
                 facModelLoadState.value=false;
                 in02modelloadstate.value=false;
                 in03modelloadstate.value=false;
+                currentTargetType.value = '';
                 window.IN03Markers=null;
                 AutoPlayer.value=false;
                 EngineContent.value.pause();
@@ -207,7 +208,11 @@ export default {
             })
             //6.监听远程过程调用加载完成消息
             player.on("NativeLoad", async (Native) => {
-                modelLoadState={};
+                //modelLoadState={};
+                //检查是否有未加载完成的模型
+                for(let k in window.modelLoadState){
+                    if(window.modelLoadState[k]==false) window.modelLoadState[k]=null;//重置模型加载状态
+                }
                 EngineContent.value.play();
                 playerNative.value =Native;                
                 //模型加载完成监听处理