Browse Source

修改websocket连接地址

hurugang 3 years ago
parent
commit
f67b460d48
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/main/resources/static/js/common/evaluation-websocket.js

+ 5 - 2
src/main/resources/static/js/common/evaluation-websocket.js

@@ -1,6 +1,9 @@
 var websocket = null;
 var ipAddress = "";
-
+//测试环境
+//var serverAddress="ws://172.16.32.161:81/thmz/evaluationWebSocket/";
+//生产环境
+var serverAddress="ws://webhis.thyy.cn:81/thmz/evaluationWebSocket/";
 /**
  * 创建webSocket
  * @param type
@@ -10,7 +13,7 @@ function openEvaluationWebSocket(type) {
         getUserIP(function(ip) {
             ipAddress = ip
             if('WebSocket' in window){
-                websocket = new WebSocket("ws://172.16.32.161:81/thmz/evaluationWebSocket/"+ipAddress+"/"+type);
+                websocket = new WebSocket(serverAddress+ipAddress+"/"+type);
             }else{
                 alert('当前浏览器不支持WebSocket,请更换浏览器');
             }