1
0
mirror of https://github.com/chatopera/cosin.git synced 2025-08-01 16:38:02 +08:00

Merge branch 'develop' into feature/#58

This commit is contained in:
Hai Liang Wang 2018-09-06 19:26:15 +08:00
commit 784eb997fa
6 changed files with 30 additions and 8 deletions

View File

@ -46,7 +46,10 @@ public class IMServerConfiguration
@Value("${uk.im.server.port}")
private Integer port;
@Value("${cs.im.server.ssl.port}")
private Integer sslPort;
@Value("${web.upload-path}")
private String path;
@ -57,9 +60,14 @@ public class IMServerConfiguration
@Bean(name="webimport")
public Integer getWebIMPort() {
UKDataContext.setWebIMPort(port);
return port;
}
if(sslPort != null){
UKDataContext.setWebIMPort(sslPort);
return sslPort;
} else {
UKDataContext.setWebIMPort(port);
return port;
}
}
@Bean
public SocketIOServer socketIOServer() throws NoSuchAlgorithmException, IOException

View File

@ -100,7 +100,10 @@ public class IMController extends Handler {
@Value("${uk.im.server.port}")
private Integer port;
@Value("${cs.im.server.ssl.port}")
private Integer sslPort;
@Value("${web.upload-path}")
private String path;
@ -338,7 +341,13 @@ public class IMController extends Handler {
map.addAttribute("hostname", request.getServerName()) ;
map.addAttribute("port", port) ;
if(sslPort != null){
map.addAttribute("port", sslPort) ;
} else {
map.addAttribute("port", port);
}
map.addAttribute("appid", appid) ;
map.addAttribute("userid", userid) ;
map.addAttribute("schema", request.getScheme()) ;

View File

@ -39,6 +39,7 @@ spring.servlet.multipart.max-request-size=50MB
uk.im.server.port=8036
uk.im.server.host=localhost
uk.im.server.threads=1000
cs.im.server.ssl.port=
##############################################
# FREEMARKER (FreeMarkerAutoConfiguration)

View File

@ -1,7 +1,8 @@
var socketCallout;
$(document).ready(function () {
socketCallout = io.connect(schema + '://' + hostname + ':' + port + '/callout/event?orgi=' + orgi + "&userid=" + userid + "&session=" + session + "&admin=" + adminuser);
var protocol = window.location.protocol.replace(/:/g,'');
socketCallout = io.connect(protocol + '://' + hostname + ':' + port + '/callout/event?orgi=' + orgi + "&userid=" + userid + "&session=" + session + "&admin=" + adminuser);
socketCallout.on('connect', function () {
console.log("Callout 连接初始化成功");
//请求服务端记录 当前用户在线事件

View File

@ -4,7 +4,8 @@ newuser['mp3'] = '/images/new.mp3';
newmessage['mp3'] = '/images/message.mp3';
ring['mp3'] = '/images/ring.mp3';
$(document).ready(function(){
socket = io.connect(schema+'://'+hostname+':'+port+'/im/agent?orgi='+orgi+"&userid="+userid+"&session="+session+"&admin="+adminuser );
var protocol = window.location.protocol.replace(/:/g,'');
socket = io.connect(protocol+'://'+hostname+':'+port+'/im/agent?orgi='+orgi+"&userid="+userid+"&session="+session+"&admin="+adminuser );
socket.on('connect',function() {
console.log("连接初始化成功");
//请求服务端记录 当前用户在线事件

View File

@ -55,6 +55,8 @@ services:
- UK_IM_SERVER_PORT=8036
- UK_IM_SERVER_HOST=localhost
- UK_IM_SERVER_THREADS=10
# set a separated port for SSL
- CS_IM_SERVER_SSL_PORT=
- SPRING_DATASOURCE_TYPE=com.alibaba.druid.pool.DruidDataSource
- SPRING_DATASOURCE_DRIVER_CLASS_NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/contactcenter?useUnicode=true&characterEncoding=UTF-8