57862207 il y a 11 mois
Parent
commit
328ce2da19
2 fichiers modifiés avec 18 ajouts et 6 suppressions
  1. 6 0
      public/loader/loader.js
  2. 12 6
      src/uwb-sample.js

+ 6 - 0
public/loader/loader.js

@@ -10,6 +10,12 @@ if(strIp == '127.0.0.1:8080')
 {
   strIp = '172.16.50.4:18080'
 }
+
+if(strIp == '172.16.30.57:8080')
+{
+  strIp = '172.16.50.4:18080'
+}
+
 const urlBaseSet =  {
         OSS: "https://bucket-model.oss-cn-beijing.aliyuncs.com",
         //CDN: "http://127.0.0.1:8080",

+ 12 - 6
src/uwb-sample.js

@@ -331,7 +331,8 @@ function getsqlData() {
           sdkInstance.sceneRenderer.scene.add(childMeshTmp)
         }
       };
-      setTimeout(()=>
+      if (window.location.href.indexOf("ordinaryPage") !== -1) {
+        setTimeout(()=>
         {
           var benchPosList = [];
           for (var item of result) {
@@ -350,6 +351,8 @@ function getsqlData() {
           window.showBenchPos(benchPosList);
         },2000
       )
+      }
+      
       
       })
     });
@@ -660,11 +663,14 @@ export function uwbMain(modelWidth, modelHeight, finalMode, callback) {
       setTimeout(() => {
         window.sdkInstance.emit("endLoading", finalMode);
         window.sdkInstance.emit("modeChange", null, finalMode);
-        window.sdkInstance.changeMode(finalMode);
-        setTimeout(() => {
-          var container = document.getElementById("ordinary-map")
-          container.style.opacity = 1;
-        }, 500)
+        if (window.location.href.indexOf("ordinaryPage") !== -1) {
+          window.sdkInstance.changeMode(finalMode);
+          setTimeout(() => {
+            var container = document.getElementById("ordinary-map")
+            container.style.opacity = 1;
+          }, 500)
+        }
+        
       }, 3000)
       sdkInstance.on("endLoading", (mode) => {
         // debugger