fix demo site

This commit is contained in:
mxd 2019-12-19 18:07:54 +08:00
parent fdbb1f1096
commit 245121f4c2

View File

@ -842,7 +842,12 @@ function onCanvasViewerClick(e,source){
}
function createWebSocket(options){
options = options || {};
var socket = new WebSocket(options.url || (location.origin.replace("http",'ws') + '/ws'));
var socket;
if(location.host === 'demo.spiderflow.org'){
socket = new WebSocket(options.url || 'ws://49.233.182.130:8088/ws');
}else{
socket = new WebSocket(options.url || (location.origin.replace("http",'ws') + '/ws'));
}
socket.onopen = options.onopen;
socket.onmessage = options.onmessage;
socket.onerror = options.onerror || function(){