✏️ 正在编辑: websocket.min.js
路径:
/srv/systems_dir/yuppiecred/public/scripts/websocket.min.js
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
function openWebsocketConnection(o,e){e++,$("#loadingWebsocket").show();var a=new ab.Session("wss://websocket.sistemayuppie.com.br/wss2/",function(){for(var e in $("#loadingWebsocket").html(""),o){var t=o[e];a.subscribe(t.id,window[e])}}.bind(o),(function(a){e<=2&&($("#loadingWebsocket").html(""),$("#loadingWebsocket").html("<p class='error'>Falha ao conectar ao websocket. Tentando novamente...</p>"),openWebsocketConnection(o,e))}),{skipSubprotocolCheck:!0});$("#loadingWebsocket").hide()}function prepareStorage(o){for(var e in o)localStorage.setItem(e,o[e])}function chamados(o,e){-1!=localStorage.getItem("assuntos_chamado").search(e.cod_assunto)&¬ify(e.titulo,e.mensagem,e.url)}function propostas(o,e){-1!=localStorage.getItem("assuntos_proposta").search(e.cod_assunto)&¬ify(e.titulo,e.mensagem,e.url)}function agenda(o,e){localStorage.getItem("usuario");e.destinatario&&(playAudio(),notify(e.titulo,e.mensagem,e.url))}function simulacao(o,e){-1!=localStorage.getItem("assuntos_simulacao").search(e.cod_assunto)&&(playAudio(),notify(e.titulo,e.mensagem,e.url))}function discador(o,e){localStorage.getItem("discador-ramal")==e.ramal&&($("#loadingWebsocket").html(""),$("#loadingWebsocket").show(),$("#loadingWebsocket").html("<p class='info'>Janela acionada pelo discador!</p>"),$("#loadingWebsocket").hide(),$("#content").load(baseUrl+"/callcenter/exibir-cliente/id/"+e.contato_id+"/chamada_id/"+e.chamada_id+"/popup/1",(function(o,e,a){try{var t=JSON.parse(a.responseText);t&&($("#content").html(""),alert(t.alert))}catch(o){}}))),consultarBarraOperador()}$(document).ready((function(){$.ajax({type:"POST",dataType:"JSON",url:baseUrl+"/auth/websocket-auth/",beforeSend:function(){$("#loadingWebsocket").html(""),$("#loadingWebsocket").html("<p class='info'>Conectando ao websocket...</p>"),$("#loadingWebsocket").show()},success:function(o){(o.hasOwnProperty("storage")&&prepareStorage(o.storage),o.hasOwnProperty("channels"))&&(Notifications.checkForPermission(),openWebsocketConnection(JSON.parse(o.channels),1))},error:function(o){},complete:function(){$("#loadingWebsocket").hide()}})}));
💾 保存文件
← 返回文件管理器