Procházet zdrojové kódy

fix: 移动端初始视角

jinx před 5 měsíci
rodič
revize
9a2b99494c
1 změnil soubory, kde provedl 4 přidání a 5 odebrání
  1. 4 5
      packages/qjkankan-view/src/pages/showMobile.vue

+ 4 - 5
packages/qjkankan-view/src/pages/showMobile.vue

@@ -261,13 +261,11 @@ onMounted(async () => {
           // if (currentScene.value.someData) {
           //   hotspots = typeof currentScene.value.someData == "string" ? JSON.parse(currentScene.value.someData).hotspots : currentScene.value.someData.hotspots;
           // }
-
           let currentHotspots = hotspots.value.filter((item) => item.navigationId == currentScene.value.id);
           if (currentHotspots.length) {
             app.Tags.initHotspot(currentHotspots, false);
           }
-
-          handleVisualLimit(app, currentScene.value);
+          handleVisualLimit(app, currentScene.value,workVisualAngleList);
         });
       }
       initWxShare(lang);
@@ -281,10 +279,11 @@ onMounted(async () => {
 const handlePass = () => {
   hasPasswordLock.value = false;
 };
-const handleVisualLimit = (app, currentScene) => {
+const handleVisualLimit = (app, currentScene,workVisualAngleList) => {
   // const { vlookatmax, vlookatmin } = currentScene.initVisual;
   // console.log('initVisual',currentScene.initVisual)
-  let currnetVisual = workVisualAngleList.forEach((item) => item.navigationId == currentScene.value.id);
+  // let currnetVisual = workVisualAngleList.find((item) => item.navigationId == currentScene.value.id);
+  let currnetVisual = workVisualAngleList.find((item) => item.navigationId == currentScene.id);
   app.krpanoDom.set(`view.limitview`, "lookat");
   app.krpanoDom.set(`view.vlookatmin`, currnetVisual.vlookatmin || -90);
   app.krpanoDom.set(`view.vlookatmax`, currnetVisual.vlookatmax || 90);