Browse Source

fix: 初始画面

jinx 5 months ago
parent
commit
9e86876b00
1 changed files with 2 additions and 3 deletions
  1. 2 3
      packages/qjkankan-view/src/components/Pano/index.vue

+ 2 - 3
packages/qjkankan-view/src/components/Pano/index.vue

@@ -35,9 +35,8 @@ const loadScene = async (currentScene) => {
 
   if (app.krpanoDom) {
     let { sceneCode, initVisual, someData } = currentScene;
-
-    let currnetVisual = metadata.value.workVisualAngleList.forEach((item) => {
-      item.navigationId == currentScene.id;
+    let currnetVisual = metadata.value.workVisualAngleList.find((item) => {
+      return item.navigationId == currentScene.id;
     });
     app.krpanoDom.call(`skin_loadscene('scene_${sceneCode}',${currnetVisual ? currnetVisual.vlookat : "0"},${currnetVisual ? currnetVisual.hlookat : "0"})`);