rindy 10 месяцев назад
Родитель
Сommit
b84ca51cb9
4 измененных файлов с 21 добавлено и 5 удалено
  1. 1 0
      src/App.vue
  2. 2 2
      src/router/index.ts
  3. 2 2
      src/sdk.js
  4. 16 1
      src/views/topicNavigation/index.vue

+ 1 - 0
src/App.vue

@@ -211,6 +211,7 @@ onMounted(()=>{
   z-index: 10
 .app-view 
   z-index: 100
+  pointer-events: none
 
 .app-scene
   width: 100%

+ 2 - 2
src/router/index.ts

@@ -1,7 +1,7 @@
-import { createRouter, createWebHistory } from 'vue-router'
+import { createRouter, createWebHistory,createWebHashHistory } from 'vue-router'
 
 const router = createRouter({
-  history: createWebHistory(),
+  history: createWebHashHistory(),
   routes: [
     {
       path: '/',

+ 2 - 2
src/sdk.js

@@ -1,7 +1,7 @@
 let config = {
-    server: 'https://www.4dkankan.com',
+    server: 'https://www.4dkankan.com/',
    // edition: 'v2',
-    view: true,// 开启编辑模式
+    view: false,// 开启编辑模式
     useAuth: false // 开启鉴权模式
 }
 

+ 16 - 1
src/views/topicNavigation/index.vue

@@ -3,7 +3,22 @@
 </template>
 
 <script setup lang="ts">
-defineProps<{ msg: string }>()
+import { useSDK } from '@/sdk'
+import {   onMounted, onUnmounted } from 'vue';
+const sdk = useSDK()
+
+onMounted(()=>{
+  sdk.Scene.whenLoaded(()=>{
+    sdk.Scene.hideFloorCadImage()
+    sdk.WalkManager.edit.enter()
+  })
+})
+
+onUnmounted(()=>{
+  sdk.Scene.showFloorCadImage()
+  sdk.WalkManager.edit.exit()
+  sdk.Camera.panorama()
+})
 
 </script>