Browse Source

https config

zhangweicheng 7 years ago
parent
commit
926d93b995
1 changed files with 2 additions and 1 deletions
  1. 2 1
      public/web/socket/connection.js

+ 2 - 1
public/web/socket/connection.js

@@ -7,7 +7,8 @@ socketObject={
       // 连接socket服务器
       var hostName = window.location.hostname;
       let me = this;
-      socket = io('http://'+hostName+':3300');
+      let port = window.location.protocol ==='http:'?3300:3301
+      socket = io(window.location.protocol+'//'+hostName+':'+port);
       socket.on('connect', function () {
           me.roomInfo={
               feeRate:me.getFeeRateRoomID(),