Browse Source

feat: save

gemercheung 1 year ago
parent
commit
dc67ce1646

+ 1 - 1
packages/qjkankan-editor/src/api/index.js

@@ -218,7 +218,7 @@ export function get3DSceneList(data, ok) {
       searchKey: "",
       cameraType: null,
       isSetData: true,
-      folderId: "",
+      folderId: Number.isInteger(folderId) ? folderId : "",
       keywordType: "sceneName",
       folderType: String(folderType),
       sceneType: null,

+ 4 - 2
packages/qjkankan-editor/src/framework/play/pano/components/list.vue

@@ -35,8 +35,10 @@
             :key="item.id"
           >
             <i
-              class="iconfont icon-edit_type_3d"
-              :class="{ iconedit_type_panorama: item.type !== '4dkk' }"
+              class="iconfont"
+              :class="
+                item.type == '4dkk' ? 'icon-editor_3d' : 'icon-editor_panoramic'
+              "
             ></i>
             <!-- <div>
               <span v-if="currentScene.id == item.id">{{

+ 1 - 0
packages/qjkankan-view/public/showMobile.html

@@ -47,6 +47,7 @@
     <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
     <link rel="icon" href="./favicon.png" />
     <title>-</title>
+    <script src="https://4dkk.4dage.com/v4-test/www/viewer/static/lib/vconsole.js"></script>
     <!-- <script src="https://4dkk.4dage.com/v4-test/www/viewer/static/lib/vconsole.js"></script>
     <script>
       var vConsole = new window.VConsole();

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

@@ -70,7 +70,7 @@ watch(
   currentScene,
   (newVal, oldVal) => {
     console.log(lang.value);
-
+    const vlog = browser.getURLParam("vlog");
     history.replaceState(
       null,
       null,
@@ -79,6 +79,7 @@ watch(
         .concat(
           `id=${metadata.value.id}&vr=${newVal.sceneCode}&lang=${lang.value}`
         )
+        .concat(`${vlog ? "&vlog=" + vlog : ""} `)
     );
 
     //默认版本是v4

+ 31 - 6
packages/qjkankan-view/src/pages/showMobile.vue

@@ -30,7 +30,15 @@ import Opening from "@/components/assembly/OpeningMobile";
 import LoadingLogo from "@/components/assembly/Loading";
 import { createApp } from "@/app";
 
-import { ref, onMounted, computed, unref, watch, nextTick } from "vue";
+import {
+  ref,
+  onMounted,
+  computed,
+  unref,
+  onBeforeMount,
+  watch,
+  nextTick,
+} from "vue";
 import { getPanoInfo, checkWork } from "@/apis";
 import { useStore } from "vuex";
 import config from "@/utils/config";
@@ -61,6 +69,14 @@ const isAutoRotate = computed(() => store.getters["functions/isAutoRotate"]);
 const earthMask = computed(() => store.getters["scene/earthMask"]);
 const skyMask = computed(() => store.getters["scene/skyMask"]);
 const isShowOpeningAnimation = ref(0);
+
+onBeforeMount(() => {
+  const vlog = browser.getURLParam("vlog");
+  if (vlog) {
+    var vConsole = new window.VConsole();
+  }
+});
+
 onMounted(async () => {
   if (!browser.isMobile()) {
     window.location.href = window.location.href.replace(
@@ -251,7 +267,10 @@ const handleMasksUpdate = (skyMask, earthMask, app) => {
     }
 
     if (skyMask.icon) {
-      app.krpanoDom.set(`hotspot[peaklogo].url`, skyMask.icon);
+      app.krpanoDom.set(
+        `hotspot[peaklogo].url`,
+        skyMask.icon + "?x-oss-process=image/resize,w_1000"
+      );
     } else {
       app.krpanoDom.set(`hotspot[peaklogo].url`, defaultMask);
     }
@@ -261,16 +280,22 @@ const handleMasksUpdate = (skyMask, earthMask, app) => {
     if ("antidistorted" in skyMask) {
       app.krpanoDom.set(`hotspot[peaklogo].distorted`, skyMask.antidistorted);
       if (!skyMask.antidistorted) {
-        app.krpanoDom.set(`hotspot[peaklogo].scale`, skyMask.scale * 0.50);
+        app.krpanoDom.set(`hotspot[peaklogo].scale`, skyMask.scale * 1.5);
       }
     }
   }
   if (earthMask) {
     if ("isShow" in earthMask) {
-      app.krpanoDom.set(`hotspot[nadirlogo].visible`, Boolean(earthMask.isShow));
+      app.krpanoDom.set(
+        `hotspot[nadirlogo].visible`,
+        Boolean(earthMask.isShow)
+      );
     }
     if (earthMask.icon) {
-      app.krpanoDom.set(`hotspot[nadirlogo].url`, earthMask.icon);
+      app.krpanoDom.set(
+        `hotspot[nadirlogo].url`,
+        earthMask.icon + "?x-oss-process=image/resize,w_1000"
+      );
     }
     if ("scale" in earthMask) {
       app.krpanoDom.set(`hotspot[nadirlogo].scale`, earthMask.scale);
@@ -281,7 +306,7 @@ const handleMasksUpdate = (skyMask, earthMask, app) => {
         earthMask.antidistorted
       );
       if (!earthMask.antidistorted) {
-        app.krpanoDom.set(`hotspot[nadirlogo].scale`, earthMask.scale * 0.50);
+        app.krpanoDom.set(`hotspot[nadirlogo].scale`, earthMask.scale * 1.5);
       }
     }
   }