...
|
...
|
@@ -147,6 +147,7 @@ let chat = { |
|
|
},
|
|
|
|
|
|
bootSocket: function() {
|
|
|
console.log(new Date().getTime(), 'boot');
|
|
|
const self = this;
|
|
|
|
|
|
let actions = {
|
...
|
...
|
@@ -167,7 +168,7 @@ let chat = { |
|
|
onOpen: $.noop,
|
|
|
sendFailCallback: function() {
|
|
|
self._sysInfo('<p>连接断开,请尝试<span class="blue">重连</span></p>')
|
|
|
.one('click', function() {
|
|
|
.one('touchend', function() {
|
|
|
self.connect();
|
|
|
});
|
|
|
},
|
...
|
...
|
@@ -355,8 +356,9 @@ let chat = { |
|
|
this.canLeaveMSG = true;
|
|
|
this.$chat.toggleClass('online', false);
|
|
|
this.toggleMenu(false);
|
|
|
console.log('bind one');
|
|
|
this._sysInfo(`<p>${content}<span class="blue">连接客服</span></p>`)
|
|
|
.one('click', function() {
|
|
|
.one('touchend', function() {
|
|
|
self.connect();
|
|
|
});
|
|
|
},
|
...
|
...
|
@@ -565,6 +567,7 @@ let chat = { |
|
|
* 处理 接收到的信息
|
|
|
*/
|
|
|
handleReceiveMSG: function(rec) {
|
|
|
console.log(new Date().getTime(), rec);
|
|
|
let recType = rec.type,
|
|
|
chatMessage = rec.chatMessage,
|
|
|
msgType = chatMessage.type,
|
...
|
...
|
@@ -892,11 +895,11 @@ let chat = { |
|
|
},
|
|
|
'switch-robot': {
|
|
|
title: '<i class="chat-status"></i><span class="js-service-txt">正在连接...</span>',
|
|
|
right: '<span data-trigger="end-chat"></span>'
|
|
|
right: '<span></span>'
|
|
|
},
|
|
|
'switch-human': {
|
|
|
title: '<i class="chat-status"></i><span class="js-service-txt">连接人工...</span>',
|
|
|
right: '<span data-trigger="end-chat"></span>'
|
|
|
right: ''
|
|
|
}
|
|
|
};
|
|
|
|
...
|
...
|
|