...
|
...
|
@@ -147,7 +147,6 @@ let chat = { |
|
|
},
|
|
|
|
|
|
bootSocket: function() {
|
|
|
console.log(new Date().getTime(), 'boot');
|
|
|
const self = this;
|
|
|
|
|
|
let actions = {
|
...
|
...
|
@@ -298,12 +297,14 @@ let chat = { |
|
|
conversationId: cmEntity.conversationId,
|
|
|
});
|
|
|
}).on('rating-success', function(e, data) {
|
|
|
const state = (window.socket || {}).readyState;
|
|
|
|
|
|
self._sysInfo(`您对我们的服务评价为:${data}`);
|
|
|
self.canEvalute = false;
|
|
|
cmEntity.type = socketConf.recType.EVALUTE_SUCCESS;
|
|
|
socket.send(JSON.stringify(cmEntity));
|
|
|
|
|
|
// resizeFooter();
|
|
|
if (state === WebSocket.OPEN) {
|
|
|
socket.send(JSON.stringify(cmEntity));
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
...
|
...
|
@@ -356,7 +357,6 @@ 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('touchend', function() {
|
|
|
self.connect();
|
...
|
...
|
@@ -567,7 +567,6 @@ let chat = { |
|
|
* 处理 接收到的信息
|
|
|
*/
|
|
|
handleReceiveMSG: function(rec) {
|
|
|
console.log(new Date().getTime(), rec);
|
|
|
let recType = rec.type,
|
|
|
chatMessage = rec.chatMessage,
|
|
|
msgType = chatMessage.type,
|
...
|
...
|
|