|
@ -8,6 +8,7 @@ let log = require("../util/log.js");
|
|
|
|
|
|
let clientCache = require('../models/socket.io/client.cache').clientCache();
|
|
let clientCache = require('../models/socket.io/client.cache').clientCache();
|
|
let PatientClient = require('./../models/socket.io/patient.client');
|
|
let PatientClient = require('./../models/socket.io/patient.client');
|
|
|
|
let PcPatientClient = require('./../models/socket.io/pcPatient.client');
|
|
let PcDoctorClient = require('./../models/socket.io/pcDoctor.client');
|
|
let PcDoctorClient = require('./../models/socket.io/pcDoctor.client');
|
|
let DoctorClient = require('./../models/socket.io/doctor.client');
|
|
let DoctorClient = require('./../models/socket.io/doctor.client');
|
|
let RtcClient = require('../models/socket.io/rtc.client.js');
|
|
let RtcClient = require('../models/socket.io/rtc.client.js');
|
|
@ -45,6 +46,8 @@ class SocketHandler {
|
|
data.userId = "pc_"+data.userId;
|
|
data.userId = "pc_"+data.userId;
|
|
}else if("pcim_doctor"===data.clientType){//用于pcim 消息通知
|
|
}else if("pcim_doctor"===data.clientType){//用于pcim 消息通知
|
|
data.userId = "pcim_"+data.userId;
|
|
data.userId = "pcim_"+data.userId;
|
|
|
|
}else if("pc_patient"===data.clientType){//新增居民PC登陆类型
|
|
|
|
data.userId= "pcpatient_"+data.userId;
|
|
}
|
|
}
|
|
|
|
|
|
if(clientCache.removeByUserId(data.userId)){
|
|
if(clientCache.removeByUserId(data.userId)){
|
|
@ -62,6 +65,16 @@ class SocketHandler {
|
|
clientCache.addClient(patientClient);
|
|
clientCache.addClient(patientClient);
|
|
users.login(data.userId, 10, '', '');
|
|
users.login(data.userId, 10, '', '');
|
|
socket.emit('ack', {});
|
|
socket.emit('ack', {});
|
|
|
|
}else if("pc_patient"===data.clientType){
|
|
|
|
//用于pcpatient 消息通知
|
|
|
|
let pcpatientClient = new PcPatientClient(socket, socketServer);
|
|
|
|
pcpatientClient.userId = data.userId;
|
|
|
|
pcpatientClient.password = data.password;
|
|
|
|
pcpatientClient.clientType = data.clientType;
|
|
|
|
pcpatientClient.sessionId = data.sessionId||"";
|
|
|
|
clientCache.addClient(pcpatientClient);
|
|
|
|
users.login(data.userId, 10, '', '');
|
|
|
|
socket.emit('ack', {});
|
|
}else if("pcim_doctor"===data.clientType){
|
|
}else if("pcim_doctor"===data.clientType){
|
|
//用于pcim 消息通知
|
|
//用于pcim 消息通知
|
|
let pcdoctorClient = new PcDoctorClient(socket, socketServer);
|
|
let pcdoctorClient = new PcDoctorClient(socket, socketServer);
|