Browse Source

feat: 重构

rindy 6 months ago
parent
commit
ddc4da3b91

+ 3 - 2
packages/qjkankan-view/.env.testdev

@@ -1,5 +1,6 @@
 VUE_APP_STATIC_DIR=showviewer
-VUE_APP_CDN=https://ossxiaoan.4dage.com
+# VUE_APP_CDN=https://ossxiaoan.4dage.com
+VUE_APP_CDN=https://4dkk.4dage.com
 VUE_APP_PROXY_URL_ROOT='https://www.4dkankan.com'
 VUE_APP_RESOURCE_URL='https://www.4dkankan.com/panorama/'
 VUE_APP_PROXY_URL='https://www.4dkankan.com/qjkankan/'
@@ -10,4 +11,4 @@ VUE_APP_APIS_URL=https://www.4dkankan.com/
 VUE_APP_DEBBUG_FLAG=0516-03
 VUE_APP_DEBBUG_NOTIFY=0
 VUE_APP_DEBBUG_V4=1
-VUE_APP_DEBBUG_V4_URL="http://192.168.0.37:8081"
+VUE_APP_DEBBUG_V4_URL="http://localhost:8081"

+ 19 - 2
packages/qjkankan-view/src/components/Fdkk/index.vue

@@ -32,15 +32,15 @@
     </template>
 
     <iframe
+      v-else
       webkitallowfullscreen="" 
 	    mozallowfullscreen="" 
 	    allowfullscreen=""
       allow="autoplay"
       :key="currentScene.sceneCode"
+      :src="V4IframeUrl"
       class="V4"
-      v-else
       id="fdkkifr"
-      :src="V4IframeUrl"
       frameborder="0"
     ></iframe>
   </div>
@@ -91,6 +91,23 @@ const V4IframeUrl = computed(() => {
 
 const handleMessage = (res) => {
   if (Object.prototype.toString.call(res.data) == "[object Object]") {
+
+    if (res.data.from === "4dkankan" && res.data.event == 'apps:panorama') {
+      if (res.data.params.showSceneList != void 0) {
+        store.commit("functions/setShowScenesList", res.data.params.showSceneList);
+      }
+      if (res.data.params.showShareUrls != void 0) {
+        store.commit("functions/setShareUrl", res.data.params.showShareUrl);
+      }
+      if(res.data.params.showToursList != void 0) {
+        Object.keys(res.data.params).forEach(key => {
+          if (key == 'showToursList') {
+            store.commit("fdkk/setShowToursList", res.data.params[key]);
+          }
+        });
+      }
+      return;
+    }
     if (res.data.source !== "qjkankan") {
       return;
     }

+ 10 - 6
packages/qjkankan-view/src/components/UIGather/index.vue

@@ -1,10 +1,10 @@
 <template>
-      <Logo />
-      <Tips />
+      <Logo v-show="showControls" />
+      <Tips v-show="showControls" />
       <div v-show="showUI">
-            <Control />
-            <Menu v-if="fdkkCurrentVersion == 'V4'" />
-            <div @click="onIsShowList" v-else
+            <Control v-if="showControls" />
+            <!-- <Menu v-if="fdkkCurrentVersion == 'V4'" /> -->
+            <div @click="onIsShowList" v-if="showControls"
                   v-show="!((metadata.catalogRoot && metadata.catalogRoot.length == 1) && scenes.length == 1 && secondaryList.length == 1)"
                   class="v3daolan" :class="{ active: isShowScenesList }">
                   <img :src="require(`@/assets/images/icon/${isShowScenesList ? 'function_off@2x.png' : 'function_on@2x.png'}`)"
@@ -34,8 +34,12 @@ const currentScene = computed(() => store.getters["scene/currentScene"]);
 const metadata = computed(() => store.getters["scene/metadata"]);
 const scenes = computed(() => store.getters["scene/list"]);
 const secondaryList = computed(() => store.getters["scene/secondaryList"]);
-
 const showUI = ref(false)
+const showControls = computed(() => {
+      if(currentScene.value.type == 'pano' || fdkkCurrentVersion.value == 'V3') {
+            return true
+      }
+});
 
 
 const onIsShowList = (data) => {

+ 5 - 2
packages/qjkankan-view/src/components/UIGather/mobile/index.vue

@@ -4,7 +4,7 @@
   <!-- <Menu /> -->
   <div v-show="showUI && !vrStatus">
     <sceneList />
-    <div class="btn-style">
+    <div class="btn-style" v-if="currentScene.type == 'pano' || fdkkCurrentVersion == 'V3'">
       <div class="menu-icon">
         <div
           @click="onIsShowList"
@@ -58,6 +58,9 @@ const scenes = computed(() => store.getters["scene/list"]);
 const secondaryList = computed(() => store.getters["scene/secondaryList"]);
 const currentScene = computed(() => store.getters["scene/currentScene"]);
 const vrStatus = computed(() => store.getters["functions/vrStatus"]);
+const fdkkCurrentVersion = computed(
+  () => store.getters["scene/fdkkCurrentVersion"]
+);
 
 const onIsShowList = (data) => {
   if (showTours.value) {
@@ -123,4 +126,4 @@ useApp().then((app) => {
     }
   }
 }
-</style>
+</style>

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

@@ -495,7 +495,6 @@ onMounted(() => {
           background: rgba(0, 0, 0, 0.5);
           width: 100%;
           overflow: hidden;
-
           > span,
           div {
             width: 100%;
@@ -506,7 +505,6 @@ onMounted(() => {
 
         &.active {
           border: 1px solid var(--colors-primary-base);
-
           > div {
             > span {
             }
@@ -542,4 +540,4 @@ onMounted(() => {
 .marquee-text-text {
   padding: 0 5px;
 }
-</style>
+</style>

+ 12 - 0
packages/qjkankan-view/vue.config.js

@@ -37,6 +37,18 @@ module.exports = defineConfig({
         changeOrigin: true,
       },
     },
+    client: {
+      overlay: {
+        runtimeErrors: (error) => {
+          if(error?.message === "ResizeObserver loop completed with undelivered notifications.")
+          {
+             console.error(error)
+             return false;
+          }
+          return true;
+        },
+      },
+    },
   },
 });