|
|
@@ -126,8 +126,8 @@
|
|
|
<!-- ********************************************************** -->
|
|
|
<!-- 人工会话模版 -->
|
|
|
<div v-if="link_success">
|
|
|
- <!--历史消息-->
|
|
|
- <div v-if="showHistory" v-for="(item, index) in hisSviceChat" :key="index">
|
|
|
+ <!--历史消息-->
|
|
|
+ <div v-if="showHistory" v-for="(item, index) in hisSviceChat" :key="'h'+index">
|
|
|
<!-- 客服信息 -->
|
|
|
<div v-if="item.from_id.startsWith('KF')">
|
|
|
<div style="width: 100%;text-align: center;">
|
|
|
@@ -338,6 +338,7 @@
|
|
|
</div>
|
|
|
<div class="row center">
|
|
|
<img style="width:1.8rem;height:1.8rem;" v-if="!trueImg" :src="avatar_imgs">
|
|
|
+ <!-- {{service_info.avatar}} -->
|
|
|
<img style="width:1.8rem;height:1.8rem;" v-if="trueImg" :src="img_http +service_info.avatar">
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -350,7 +351,7 @@
|
|
|
</div>
|
|
|
<!-- 广告图 -->
|
|
|
<div class="leftMain-bottom row center" style="padding:0 .3rem;margin-top:.6rem;">
|
|
|
- <a :href="'http://'+advertisement.advertisement_url" target="_blank" rel="noopener noreferrer">
|
|
|
+ <a :href="'https://'+advertisement.advertisement_url" target="_blank" rel="noopener noreferrer">
|
|
|
<img style="width:4.2rem;height:7rem;" :src="img_http+advertisement.advertisement_img">
|
|
|
</a>
|
|
|
</div>
|
|
|
@@ -607,9 +608,7 @@
|
|
|
//初始化Websocket链接
|
|
|
initWebSocket(apiToken) {
|
|
|
let sock_ip = ''; // 线上
|
|
|
- // let sock_ip = 'ws://192.168.2.187:9101'; // 本地
|
|
|
-
|
|
|
- this.websock = new WebSocket("wss://ky.281570.com:9101?apiToken=" + apiToken);
|
|
|
+ this.websock = new WebSocket("wss://ky.281570.com?apiToken=" + apiToken);
|
|
|
//数据返回
|
|
|
this.websock.onmessage = this.socket_message;
|
|
|
//数据发送
|
|
|
@@ -680,7 +679,7 @@
|
|
|
content: {text: redata.data.content}
|
|
|
})
|
|
|
}
|
|
|
- console.log(this.robot);
|
|
|
+ //console.log(this.robot);
|
|
|
// this.automaticRolling();
|
|
|
//data
|
|
|
//this.robot =
|
|
|
@@ -895,8 +894,8 @@
|
|
|
obj.data.chatLog.forEach(res => {
|
|
|
// console.log(res,'历史信息');
|
|
|
res.content = JSON.parse(res.content);
|
|
|
+ res.content.text =this.turnFace(res.content.text);
|
|
|
let time_line = this.$public.customFormatDateTime(res.time_line, '', 3);
|
|
|
- // res.time_line =
|
|
|
if (!historyTime) {
|
|
|
res.time_line = time_line
|
|
|
} else {
|
|
|
@@ -908,10 +907,10 @@
|
|
|
res.time_line = time_line
|
|
|
}
|
|
|
}
|
|
|
+ // console.log(res.content);
|
|
|
historyTime = time_line;
|
|
|
this.hisSviceChat.push(res);
|
|
|
})
|
|
|
-
|
|
|
}
|
|
|
|
|
|
//获取发送时间
|
|
|
@@ -1003,7 +1002,6 @@
|
|
|
//用户匿名注册
|
|
|
registered() {
|
|
|
let token = localStorage.getItem('token');
|
|
|
-
|
|
|
let appuid = this.$public.getQueryString('appuid');
|
|
|
let tutype = this.$public.getQueryString('tutype');
|
|
|
if (appuid && tutype >= 1) {
|
|
|
@@ -1013,19 +1011,16 @@
|
|
|
} else {
|
|
|
token = '';
|
|
|
}
|
|
|
-
|
|
|
let data = {
|
|
|
token: token != null ? token : '',
|
|
|
appid: this.$public.getQueryString('appid'),
|
|
|
appuid: this.$public.getQueryString('appuid'),
|
|
|
}
|
|
|
-
|
|
|
let obj = {
|
|
|
headers: {
|
|
|
"apiToken": this.setApiToken('autoReg', 'register', this.currentTime[0], 'index')
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
this.$http.post('/index/register/autoReg', data, obj).then(res => {
|
|
|
if (res.data.code == 0) {
|
|
|
this.$dialog.alert({
|
|
|
@@ -1147,7 +1142,6 @@
|
|
|
robot_name: formatStr,
|
|
|
robotgroups_id: '1',
|
|
|
}
|
|
|
-
|
|
|
// console.log(this.turnFace(formatStr));
|
|
|
type = 'toRobot';
|
|
|
//本地存放数据
|
|
|
@@ -1318,7 +1312,7 @@
|
|
|
this.areaHeight = area.scrollHeight > 36 ? area.scrollHeight : 36;
|
|
|
let main = document.getElementById('main')
|
|
|
this.makeExpandingArea(area)
|
|
|
- console.log('screen:', window.screen.height, 'inner:', window.innerHeight)
|
|
|
+ //console.log('screen:', window.screen.height, 'inner:', window.innerHeight)
|
|
|
// main.style.bottom = this.needScrollTop + 'px'
|
|
|
// console.log('foucus', this.needScrollTop)
|
|
|
// this.automaticRolling();
|
|
|
@@ -1711,7 +1705,9 @@
|
|
|
height: 83vh;
|
|
|
overflow-x: hidden;
|
|
|
overflow-y: auto;
|
|
|
- padding: 0 0.6rem;
|
|
|
+ padding:0.4rem 0.3rem;
|
|
|
+ padding-top:0;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
.btn {
|