Explorar o código

fix 部分ip日志打印

Jay hai 7 meses
pai
achega
b7bb757bd9
Modificáronse 2 ficheiros con 6 adicións e 3 borrados
  1. 2 1
      src/main.js
  2. 4 2
      src/uwb-sample.js

+ 2 - 1
src/main.js

@@ -36,6 +36,7 @@ Vue.use(vuescroll, {
 Vue.config.productionTip = false;
 
 var strUrl = window.location.href;
+console.log("strUrl", strUrl)
 var strIp = "";
 if (strUrl.indexOf("172.16.50.4") != -1) {
   strIp = "172.16.50.4:19703";
@@ -48,7 +49,7 @@ Vue.use(
   new VueSocketIO({
     debug: true,
     connection: "ws://" + strIp,
-    // connection: "ws://121.42.8.157:19703",
+    // connection: "ws://121.42.8.157:19702",
     options: {
       transports: ["websocket", "polling"],
     },

+ 4 - 2
src/uwb-sample.js

@@ -1158,8 +1158,8 @@ function benchRefresh(result) {
   } else { // 台架变化,需移除原模型后重新添加新模型
     // console.log("台架id变动")
     oldBenchIds = newBenchIds;
-    // 请求到的新台架id
 
+    // 请求到的新台架id
     let new_bench_id_arr = [];
     benchList.forEach(function (item) {
       new_bench_id_arr.push(item.id);
@@ -1325,6 +1325,7 @@ export function uwbMain(domId, modelWidth, modelHeight, finalMode, callback) {
           element.style.marginTop = ((height - (height * ratio)) / 2) + 'px';
           let playersmall = document.getElementById('playersmall')
           playersmall.appendChild(element)
+
           modeChangeInterval = setInterval(() => {
             if (window.sdkInstance.player.controls) {
               clearInterval(modeChangeInterval);
@@ -1379,7 +1380,7 @@ export function uwbMain(domId, modelWidth, modelHeight, finalMode, callback) {
         let pointLight = new THREE.PointLight(0xffffff, 1, 0);
         pointLight.position.set(200, 200, 200); // 设置点光源位置
         sdkInstance.sceneRenderer.scene.add(pointLight); // 将点光源添加至场景
-        
+
         if (g_gltf_downloaded == false) {
           g_gltf_downloaded = true;
         }
@@ -1584,6 +1585,7 @@ export function uwbMain(domId, modelWidth, modelHeight, finalMode, callback) {
         // };
 
       });
+
       sdkInstance.on("modeChange", function (currentMode, newMode) {
         if (newMode === "transitioning") {
           return;