|
@@ -47,7 +47,7 @@
|
|
|
<!-------------------机器人聊天板块 ----------------------->
|
|
<!-------------------机器人聊天板块 ----------------------->
|
|
|
<div v-if="machineAndAtl == 10">
|
|
<div v-if="machineAndAtl == 10">
|
|
|
<!--··············· 欢迎语 ············-->
|
|
<!--··············· 欢迎语 ············-->
|
|
|
- <div class="conversationBox">
|
|
|
|
|
|
|
+ <div id="welcome" class="conversationBox">
|
|
|
<div class="row" v-for="(item,index) in machine" :key="index">
|
|
<div class="row" v-for="(item,index) in machine" :key="index">
|
|
|
<div class="conversation row">
|
|
<div class="conversation row">
|
|
|
<div class="headImg">
|
|
<div class="headImg">
|
|
@@ -1215,6 +1215,7 @@
|
|
|
this.websock.send('{"type":"pong"}')
|
|
this.websock.send('{"type":"pong"}')
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (redata.type == 'pong') return false;
|
|
|
|
|
|
|
|
if (redata.type != 'pong' || redata.message_type != "ping") {
|
|
if (redata.type != 'pong' || redata.message_type != "ping") {
|
|
|
console.log(redata)
|
|
console.log(redata)
|
|
@@ -1302,8 +1303,6 @@
|
|
|
}
|
|
}
|
|
|
//接收客服会话
|
|
//接收客服会话
|
|
|
if (redata.message_type == 'chatMessage') {
|
|
if (redata.message_type == 'chatMessage') {
|
|
|
- // 转接的时候清除历史信息
|
|
|
|
|
- this.hisSviceChat = [];
|
|
|
|
|
// 接收提示音
|
|
// 接收提示音
|
|
|
this.receiveAudio();
|
|
this.receiveAudio();
|
|
|
//存储会话超时间
|
|
//存储会话超时间
|
|
@@ -1432,7 +1431,11 @@
|
|
|
this.historyMsgtext = obj.data.content;
|
|
this.historyMsgtext = obj.data.content;
|
|
|
|
|
|
|
|
obj.data.chatLog.forEach(res => {
|
|
obj.data.chatLog.forEach(res => {
|
|
|
- res.content = JSON.parse(res.content)
|
|
|
|
|
|
|
+ let content = JSON.parse(res.content)
|
|
|
|
|
+ if (content.text) {
|
|
|
|
|
+ content.text = this.turnFace(content.text)
|
|
|
|
|
+ res.content = content
|
|
|
|
|
+ }
|
|
|
this.hisSviceChat.push(res)
|
|
this.hisSviceChat.push(res)
|
|
|
})
|
|
})
|
|
|
this.customerSviceChat.push({type: 'system', str: 'historyMsg'})
|
|
this.customerSviceChat.push({type: 'system', str: 'historyMsg'})
|
|
@@ -1747,6 +1750,9 @@
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
|
|
+ #welcome .row{
|
|
|
|
|
+ margin-bottom: 5px;
|
|
|
|
|
+ }
|
|
|
.chatBox {
|
|
.chatBox {
|
|
|
width: 700px;
|
|
width: 700px;
|
|
|
position: relative;
|
|
position: relative;
|