jinx 8 月之前
父節點
當前提交
8a9618523e

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

@@ -20,6 +20,7 @@ const lang = computed(() => config.lang);
 
 const hotspots = computed(() => store.getters["tags/hotspots"]);
 const currentScene = computed(() => store.getters["scene/currentScene"]);
+const vrStatus = computed(() => store.getters["functions/vrStatus"]);
 const isHasNormalBGM = computed(() => store.getters["audio/isHasNormalBGM"]);
 const scenesList = computed(() => store.getters["scene/list"]);
 const metadata = computed(() => store.getters["scene/metadata"]);
@@ -211,10 +212,12 @@ useApp().then((app) => {
           return;
         }
         if (hotspot.hotspotType == "scene") {
+          console.error(scenesList.value);
           store.commit(
             "scene/setCurrentScene",
             scenesList.value.find((item) => item.id == hotspot.scene.id)
           );
+          // store.commit("scene/setCurrentScenesList", sceneList);
           updateListPosi();
         } else if (hotspot.hotspotType == "link") {
           if (hotspot.linkOpenType == "newTab") {

+ 32 - 0
packages/qjkankan-view/src/components/UIGather/list.vue

@@ -180,6 +180,38 @@ watch(
     });
   }
 );
+watch(
+  () => currentScene.value,
+  () => {
+    nextTick(() => {
+      let currentSceneData = currentScene.value;
+      metadata.value.navigationTrees.forEach((item, index) => {
+        let activeScene = item.children.find((pano) => pano.id == currentSceneData.id);
+
+        if (activeScene) {
+          store.commit("scene/setCurrentScenesList", item.children);
+          store.commit("scene/setData", { currentSecondId: null, currentRootId: item.id });
+        }
+        item = item.children.forEach((s_item, s_index) => {
+          activeScene = s_item.children.find((pano) => pano.id == currentSceneData.id);
+
+          if (activeScene) {
+            store.commit("scene/setCurrentScenesList", s_item.children);
+            store.commit("scene/setData", { currentSecondId: s_item.id, currentRootId: item.id });
+          }
+          s_item = s_item.children.forEach((t_item, t_index) => {
+            activeScene = t_item.children.find((pano) => pano.id == currentSceneData.id);
+
+            if (activeScene) {
+              store.commit("scene/setCurrentScenesList", s_item.children);
+              store.commit("scene/setData", { currentSecondId: s_item.id, currentRootId: item.id });
+            }
+          });
+        });
+      });
+    });
+  }
+);
 
 watch(
   () => rootTabIndex.value,

+ 5 - 3
packages/qjkankan-view/src/components/UIGather/mobile/list.vue

@@ -219,9 +219,11 @@ const swiperOptions = {
   },
 };
 const tabRoot = (item, index) => {
-  store.commit("scene/setData", { currentRootId: item.id });
-  store.commit("scene/setData", { currentSecondId: null });
-  changeSceneList();
+  store.commit("scene/setData", { currentRootId: item.id, currentSecondId: null });
+  setTimeout(() => {
+    changeSceneList();
+  }, 0);
+
   // setTimeout(() => {
   //   rootGroupSwiper.value.slideTo(index);
   //   SecondGroupSwiper.value.slideTo(rootTabIndex.value);

+ 14 - 3
packages/qjkankan-view/src/pages/showMobile.vue

@@ -37,6 +37,17 @@ import { useWxShared } from "@/hooks/useWxshared";
 import { useAudio } from "@/hooks/useAudio";
 import { useI18n, getLocale } from "@/i18n";
 import { Dialog } from "@/global_components";
+
+import { debounce } from "lodash";
+
+const _ = window.ResizeObserver;
+window.ResizeObserver = class ResizeObserver extends _ {
+  constructor(callback) {
+    callback = debounce(callback, 100);
+    super(callback);
+  }
+};
+
 const { t } = useI18n({ useScope: "global" });
 
 const { initWxShare } = useWxShared();
@@ -60,9 +71,9 @@ const isShowOpeningAnimation = ref(0);
 
 onBeforeMount(() => {
   const vlog = browser.getURLParam("vlog");
-  if (vlog) {
-    var vConsole = new window.VConsole();
-  }
+  // if (vlog) {
+  var vConsole = new window.VConsole();
+  // }
 });
 
 onMounted(async () => {

+ 2 - 2
packages/qjkankan-view/vue.config.js

@@ -18,8 +18,8 @@ module.exports = defineConfig({
     },
   },
   devServer: {
-    port: 443,
-    https: true,
+    // port: 443,
+    // https: true,
     headers: {
       "Cache-Control": "no-store",
     },