|
@@ -125,15 +125,37 @@ export const gotoScene = async (scene: Scene, edit = false) => {
|
|
|
}
|
|
|
}
|
|
|
params.set("lang", "zh");
|
|
|
- if (scene.sceneCode.startsWith("KJ")) {
|
|
|
- const qjURL = import.meta.env.VITE_QJ_URL;
|
|
|
- params.set("id", scene.sceneCode);
|
|
|
- // console.log('')
|
|
|
- window.open(`${qjURL}/${edit ? "edit" : "show"}.html?` + params.toString());
|
|
|
- } else {
|
|
|
- params.set("m", scene.sceneCode);
|
|
|
- window.open(`${import.meta.env.VITE_LASER_URL}/?` + params.toString());
|
|
|
+
|
|
|
+ switch (Number(scene.sceneSource)) {
|
|
|
+ case SceneType.VR:
|
|
|
+ const qjURL = import.meta.env.VITE_QJ_URL;
|
|
|
+ params.set("id", scene.sceneCode);
|
|
|
+ window.open(`${qjURL}/${edit ? "edit" : "show"}.html?` + params.toString());
|
|
|
+ break;
|
|
|
+ case SceneType.CLUNT:
|
|
|
+ params.set("m", scene.sceneCode);
|
|
|
+ window.open(`${import.meta.env.VITE_LASER_URL}/?` + params.toString());
|
|
|
+ break;
|
|
|
+ case SceneType.MESH:
|
|
|
+ params.set("m", scene.sceneCode);
|
|
|
+ const kk_url = import.meta.env.VITE_4DKK_URL;
|
|
|
+ const dest = edit ? `${kk_url}/epg.html?${params.toString()}` : `${kk_url}/spg.html?${params.toString()}`;
|
|
|
+ console.log('mesh-url', dest)
|
|
|
+ window.open(dest);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
}
|
|
|
+
|
|
|
+ // if (scene.sceneCode.startsWith("KJ")) {
|
|
|
+ // const qjURL = import.meta.env.VITE_QJ_URL;
|
|
|
+ // params.set("id", scene.sceneCode);
|
|
|
+ // // console.log('')
|
|
|
+ // window.open(`${qjURL}/${edit ? "edit" : "show"}.html?` + params.toString());
|
|
|
+ // } else {
|
|
|
+ // params.set("m", scene.sceneCode);
|
|
|
+ // window.open(`${import.meta.env.VITE_LASER_URL}/?` + params.toString());
|
|
|
+ // }
|
|
|
};
|
|
|
|
|
|
// 普通场景状态
|