mirror of
https://github.com/chatopera/cosin.git
synced 2025-08-01 16:38:02 +08:00
#57 fix socket connection for mobile clients
This commit is contained in:
parent
b698526a6d
commit
bc6b9f382a
@ -280,7 +280,8 @@
|
|||||||
// 参数连接
|
// 参数连接
|
||||||
// 参数连接
|
// 参数连接
|
||||||
var hostname = location.hostname ;
|
var hostname = location.hostname ;
|
||||||
var socket = io.connect('${schema!'http'}://'+hostname+':${port}/im/user?userid=${userid!''}<#if aiid??>&aiid=${aiid}</#if>&orgi=${orgi!''}&session=${sessionid!''}&appid=${appid!''}&osname=${(osname!'')?url}&browser=${(browser!'')?url}<#if skill??>&skill=${skill}</#if><#if agent??>&agent=${agent}</#if>');
|
var protocol = window.location.protocol.replace(/:/g,'');
|
||||||
|
var socket = io.connect(protocol + '://'+hostname+':${port}/im/user?userid=${userid!''}<#if aiid??>&aiid=${aiid}</#if>&orgi=${orgi!''}&session=${sessionid!''}&appid=${appid!''}&osname=${(osname!'')?url}&browser=${(browser!'')?url}<#if skill??>&skill=${skill}</#if><#if agent??>&agent=${agent}</#if>');
|
||||||
socket.on('connect',function(){
|
socket.on('connect',function(){
|
||||||
//service.sendRequestMessage();
|
//service.sendRequestMessage();
|
||||||
//output('<span id="callOutConnect-message">'+ new Date().format("yyyy-MM-dd hh:mm:ss") + ' 开始沟通' +'</span>' , 'message callOutConnect-message');
|
//output('<span id="callOutConnect-message">'+ new Date().format("yyyy-MM-dd hh:mm:ss") + ' 开始沟通' +'</span>' , 'message callOutConnect-message');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user