1
0
mirror of https://github.com/chatopera/cosin.git synced 2025-06-16 18:30:03 +08:00

Revert "fix #1006"

This commit is contained in:
lecjy 2024-04-20 00:26:37 +08:00 committed by GitHub
parent a8af534129
commit 6026541ab8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -545,7 +545,7 @@ html
var hostname = location.hostname;
var protocol = window.location.protocol.replace(/:/g, '');
var username = encodeURIComponent("#{username}");
var socket = io(protocol + '://' + hostname + ':location.port/im/user?userid=#{userid}&session=#{sessionid}&appid=#{appid}&osname=!{osname}&browser=!{browser}!{skill ? "&skill=" + skill : ""}!{username ? "&nickname='+username+'" : ""}!{agent ? "&agent=" + agent : ""}!{title ? "&title=" + title : ""}!{traceid ? "&url=" + url : ""}!{traceid ? "&traceid=" + traceid : ""}!{isInvite ? "&isInvite=" + isInvite : ""}', {transports: ['websocket', 'polling']});
var socket = io(protocol + '://' + hostname + ':#{port}/im/user?userid=#{userid}&session=#{sessionid}&appid=#{appid}&osname=!{osname}&browser=!{browser}!{skill ? "&skill=" + skill : ""}!{username ? "&nickname='+username+'" : ""}!{agent ? "&agent=" + agent : ""}!{title ? "&title=" + title : ""}!{traceid ? "&url=" + url : ""}!{traceid ? "&traceid=" + traceid : ""}!{isInvite ? "&isInvite=" + isInvite : ""}', {transports: ['websocket', 'polling']});
console.log('connect debug', protocol, hostname);