|
@@ -617,6 +617,7 @@ us.send = function (response, messageinfo) {
|
|
|
us.updatecscl(_message.messageInfo, _messagearr[j].receiveId);
|
|
|
}
|
|
|
console.log(_messagelist)
|
|
|
+ console.log(_messagearr)
|
|
|
//调用群发函数
|
|
|
_messagearr[0] && us.broadcast(_messagelist, _messagearr[0].messageInfo.pageId, 'cscl');
|
|
|
break;
|
|
@@ -741,11 +742,6 @@ us.updatecscl = function (messageInfo, classId) {
|
|
|
if (us.cscl[classId]) {
|
|
|
var i, j, _is;
|
|
|
var _obj = us.cscl[classId].content;
|
|
|
- console.log("====================a=================")
|
|
|
- console.log(messageInfo)
|
|
|
- console.log(_obj)
|
|
|
- console.log(_obj.backgroundUrl)
|
|
|
- console.log("====================b=================")
|
|
|
_obj.backgroundUrl = messageInfo.backgroundUrl;
|
|
|
_obj.edges = _obj.edges || [];
|
|
|
_obj.nodes = _obj.nodes || [];
|
|
@@ -775,9 +771,6 @@ us.updatecscl = function (messageInfo, classId) {
|
|
|
_obj.nodes.push(messageInfo.nodes[i])
|
|
|
}
|
|
|
}
|
|
|
- console.log("====================messageInfo2=========================");
|
|
|
- console.log(_obj);
|
|
|
- console.log(JSON.stringify(_obj));
|
|
|
//如果不存在则去数据库查找
|
|
|
us.mysql.usselect(['172.16.12.5', 'pbl', 'updateRoomData', JSON.stringify(_obj), classId],
|
|
|
function (ret) {
|
|
@@ -1435,6 +1428,9 @@ us.broadcast = function (messageinfo, pageid, type) {
|
|
|
for (i in messageinfo) {
|
|
|
_messageinfo = messageinfo[i]; //记录消息消息
|
|
|
_users = us[type][i] ? us[type][i].user : {}; //记录用户集合
|
|
|
+ console.log("=================e=============");
|
|
|
+ console.log(us[type]);
|
|
|
+ console.log(_messageinfo);
|
|
|
for (j in _users) { //循环处理每个用户处理 给每个用户集合下的用户发送消息
|
|
|
_pageids = _users[j]; //记录当前用户在每个端登录的页面唯一识别ID
|
|
|
for (o = 0; o < _pageids.length; o++) { //循环发送给当前用户在每个端登录的用户
|