Sfoglia il codice sorgente

点云场景编辑链接

tangning 1 giorno fa
parent
commit
a423637523
1 ha cambiato i file con 6 aggiunte e 9 eliminazioni
  1. 6 9
      src/view/newFireCase/dyManager/sceneContent.vue

+ 6 - 9
src/view/newFireCase/dyManager/sceneContent.vue

@@ -80,7 +80,7 @@ import { confirm } from "@/helper/message";
 import { sceneDownload } from "./quisk";
 import { sceneShare as openSceneShare } from "@/view/case/quisk";
 import { downSceneHash } from "@/request";
-import { SceneTypeDesc } from '@/constant/scene';
+import { SceneTypeDesc, SceneTypePaths } from '@/constant/scene';
 import { transformSWToken } from "@/store/user";
 const testLaserUrl = import.meta.env.VITE_SWSS_URL;
 const LaserUrl = import.meta.env.VITE_FDKK_URL;
@@ -115,14 +115,11 @@ const getMeshScene = async (scene: QuoteScene) => {
 const openSceneEdit = async (scene: QuoteScene, type: any) => {
   const token = await transformSWToken(scene, type);
   if (!token) return;
-  const isTest = window.location.host.includes("localhost") || window.location.host.includes("test");
-  let base = isTest ? "https://test.4dkankan.com" : "https://4dkankan.com";
-  if(scene.isObj === 0){
-    base = isTest ? testLaserUrl : LaserUrl;
-    window.open(`${base}/index.html?m=${scene.num}&token=${token}`, "_blank");
-    return
-  }
-  window.open(`${base}/epg.html?m=${scene.num}&token=${token}`, "_blank");
+
+  let newUrl = SceneTypePaths[scene.type][1];
+  let returnurl = window.location.origin + window.location.pathname + '/#/login';
+  window.open(`${newUrl}?m=${scene.num}&token=${token}&returnurl=${encodeURIComponent(returnurl)}`, "_blank");
+  // window.open(`${base}/epg.html?m=${scene.num}&token=${token}`, "_blank");
 };
 
 const openLaserSceneEdit = async (scene: QuoteScene, type: any) => {