人生啊人生 2 сар өмнө
parent
commit
284962eec6

+ 6 - 2
.env.development

@@ -6,5 +6,9 @@
 # VITE_API_BASE_URL =http://125.94.230.25:8071
 VITE_API_BASE_URL =https://api.3dyzt.com:8887
 
-#发布的虚拟目录
-VITE_APP_Vitrural =./
+# 发布的虚拟目录
+VITE_APP_Vitrural =./
+
+# 加载三维文件的前缀地址
+VITE_THREE_WORLD_URL = http://localhost:5173
+# VITE_THREE_WORLD_URL = https://www.3dyzt.com/waterMaintenance

+ 6 - 1
.env.production

@@ -7,4 +7,9 @@
 VITE_API_BASE_URL =https://api.3dyzt.com:8887
 
 #发布的虚拟目录
-VITE_APP_Vitrural =./
+VITE_APP_Vitrural =./
+
+# 加载三维文件的前缀地址
+VITE_THREE_WORLD_URL = http://localhost:5173
+# VITE_THREE_WORLD_URL = https://www.3dyzt.com/waterMaintenance
+

+ 14 - 5
src/components/ThreeWorldEventQingXiCheAndQv/ThreeWorldEventMainQingXiCheAndQv.vue

@@ -44,12 +44,12 @@ import { QingXiCheAndQvComClipPlaneMeshEvent } from "./js/QingXiCheAndQvComClipP
 //  */
 // let threeWorldUrl = "3dMain/index.html#/main?id=zidingyi";
 
-let commonconfig = "http://localhost:5173/3dMain/model_water_car_3/";
-let commonmodel = "http://localhost:5173/3dMain/model_water_car_3/";
+// let commonconfig = "http://localhost:5173/3dMain/model_water_car_3/";
+// let commonmodel = "http://localhost:5173/3dMain/model_water_car_3/";
 
-let threeWorldUrl = "3dMain/index.html#/main?id=zidingyi_lu_cun&user=zidingyi"
-+ '&commonconfig=' + commonconfig
-+ '&commonmodel=' + commonmodel;
+// let threeWorldUrl = "3dMain/index.html#/main?id=zidingyi_lu_cun&user=zidingyi"
+// + '&commonconfig=' + commonconfig
+// + '&commonmodel=' + commonmodel;
 
 // let commonconfig = "https://www.3dyzt.com/waterMaintenance/3dMain/model_water_car_3/";
 // let commonmodel = "https://www.3dyzt.com/waterMaintenance/3dMain/model_water_car_3/";
@@ -59,6 +59,15 @@ let threeWorldUrl = "3dMain/index.html#/main?id=zidingyi_lu_cun&user=zidingyi"
 // + '&commonmodel=' + commonmodel;
 
 
+let hostUrl = import.meta.env.VITE_THREE_WORLD_URL;
+let commonconfig = hostUrl + "/3dMain/model_water_car_3/";
+let commonmodel = hostUrl + "/3dMain/model_water_car_3/";
+
+let threeWorldUrl = "3dMain/index.html#/main?id=zidingyi_lu_cun&user=zidingyi"
++ '&commonconfig=' + commonconfig
++ '&commonmodel=' + commonmodel;
+
+
 /**
  * 回调加载百分比
  */