/**
 * Created by zhangweicheng on 2017/8/7.
 */
socketObject={
  connect:function () {
      // 连接socket服务器
      var hostName = window.location.hostname;
      socket = io('http://'+hostName+':3300');
      socket.on('connect', function () {

          var roomID = projectObj.project.FeeRate.getActivateFeeRateID();
          socket.emit('join', roomID);
          console.log('连接成功');
      });

      socket.on('feeRateChange', function(data) {
          //data = JSON.parse(data);

          $("#message").html('费率文件已被修改，<a href="javascript:void(0);" id="load-data" onclick="window.location.reload()">点击加载</a>');
          $("#notify").show();
          //alert('费率文件已经修改，请刷新页面');
          //window.location.reload();
      })

  }
}