Browse Source

feat: minimap

chenlei 10 months ago
parent
commit
6402753928
2 changed files with 11 additions and 11 deletions
  1. 3 2
      src/components/Title.vue
  2. 8 9
      src/views/Home.vue

+ 3 - 2
src/components/Title.vue

@@ -113,7 +113,7 @@
         {
           label: '4-2号楼4层 双人自理间',
           sceneCode: 'KJ-SfNcYJffCof',
-          href: 'https://houseoss.4dkankan.com/project/GDHCYL/scene/index.html',
+          href: '/?pose=pano:16,qua:-0.0382,-0.0274,-0.001,0.9989',
           params:
             '&firstView=pano:16,qua:-0.07389770295455884,-0.022001805388514675,-0.001630739657061169,0.9970217626634693',
         },
@@ -254,6 +254,7 @@
           sceneCode: 'KJ-SfNcYJffCof',
           params:
             '&firstView=pano:136,qua:-0.04730401416249904,-0.6225940589150876,-0.03774820655556335,0.7802012747957571',
+          href: '/'
         },
         {
           label: '光大4-2号楼-5F',
@@ -280,7 +281,7 @@
     },
     methods: {
       changeScene(item) {
-        location.href = item.href ? `${location.origin}${location.pathname}` : `https://scene.4dage.com/zgrs.html?m=${item.sceneCode}${item.params ? item.params : ''}`;
+        location.href = item.href ? item.href : `https://scene.4dage.com/zgrs.html?m=${item.sceneCode}${item.params ? item.params : ''}`;
       }
     }
   }

+ 8 - 9
src/views/Home.vue

@@ -217,11 +217,11 @@ export default {
       // resource:'',
       // server:''
     });
-    // kankan.use("MinMap", {
-    //   theme: {
-    //     camera_fillStyle: "#930909",
-    //   },
-    // });
+    kankan.use("MinMap", {
+      theme: {
+        camera_fillStyle: "#930909",
+      },
+    });
 
     kankan.use("TourPlayer").then((player) => {
       player.on("play", ({ partId, frameId }) => {
@@ -524,14 +524,13 @@ export default {
   }
 
   /deep/[xui_min_map] {
-    display: none;
     width: 180px;
     height: 180px;
-    border: 2px solid #d8b275;
+    border: 2px solid rgba(203, 25, 29, 0.5);
     background-color: rgba(81, 32, 32, 0.4);
-    border-radius: 0 0 8px 8px;
+    border-radius: 8px;
     right: 20px;
-    top: 65px;
+    top: 20px;
   }
 }
 </style>