Commit 6873067c by 施宇

321

parent 5c4278ed
Showing with 9 additions and 2 deletions
......@@ -89,8 +89,12 @@ $(function () {
},
customerChat: function () {
if (Util.getCookie('customer')) {
Util.delCookie('customer', cookieHostname);
$(".notice_classify[userid=" + this.defaultName + "]").attr('isCustomer', true);
}
},
addUser: function (obj, isDefault, isFirst) {
......@@ -451,7 +455,7 @@ $(function () {
onOpened: function (message) {
console.log('登入成功')
self.isLoginSuccess = true;
self.customerChat()
self.customerChat();
self.singleChat();
},
onTextMessage: function (message) {
......@@ -601,6 +605,7 @@ $(function () {
layer.msg('消息发送失败');
}
});
// console.log(msg.body)
this.conn.send(msg.body);
},
sendCmd: function (templateObj) {
......@@ -772,6 +777,7 @@ $(function () {
layer.msg('聊天系统出错');
return;
}
return;
}
if (isTemplate) {
$(this).removeAttr('isTemplate');
......@@ -794,7 +800,8 @@ $(function () {
if (firstClick) {
$(this).removeAttr('firstClick');
if (self.isLoginSuccess) { //登入成功 获取聊天记录
self.getHistoryData(id)
self.getHistoryData(id);
} else {
layer.msg('聊天系统出错');
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment