|
@@ -21,8 +21,11 @@
|
|
|
|
|
|
|
|
<div class="row">
|
|
<div class="row">
|
|
|
<yd-button v-if="isExit" color="#fff" bgcolor="#1d57dd" class="exit" size="mini" type="primary"
|
|
<yd-button v-if="isExit" color="#fff" bgcolor="#1d57dd" class="exit" size="mini" type="primary"
|
|
|
- @click.native="is_exit()">结束聊天
|
|
|
|
|
|
|
+ >
|
|
|
</yd-button>
|
|
</yd-button>
|
|
|
|
|
+ <!-- <yd-button v-if="isExit" color="#fff" bgcolor="#1d57dd" class="exit" size="mini" type="primary"
|
|
|
|
|
+ @click.native="is_exit()">结束聊天
|
|
|
|
|
+ </yd-button> -->
|
|
|
<img class="icon-msg" v-if="( chat.length -1 ) + hisLength >= chatNum" @click="is_show_evaluate()" src="@/assets/Service2.png">
|
|
<img class="icon-msg" v-if="( chat.length -1 ) + hisLength >= chatNum" @click="is_show_evaluate()" src="@/assets/Service2.png">
|
|
|
<img class="icon-msg" @click="knowledge = true,flag = false" src="@/assets/leaveSwitch.png" v-if="!isExit">
|
|
<img class="icon-msg" @click="knowledge = true,flag = false" src="@/assets/leaveSwitch.png" v-if="!isExit">
|
|
|
</div>
|
|
</div>
|
|
@@ -52,8 +55,7 @@
|
|
|
<img style="width:.3rem;height:.3rem;" src="@/assets/addright.png">
|
|
<img style="width:.3rem;height:.3rem;" src="@/assets/addright.png">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="row item-center" style="height:.72rem;">
|
|
<div class="row item-center" style="height:.72rem;">
|
|
|
- <p>以上问题都不是</p>
|
|
|
|
|
- <div style="color:#5EA0F7;padding-left:.1rem;" @click="connectionService">转人工客服</div>
|
|
|
|
|
|
|
+ <p>以上问题都不是 <span class="fontStyle" @click="connectionService"> 请转人工客服</span></p>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -74,13 +76,13 @@
|
|
|
<yd-lightbox-img :src=" img_http + item.content.img"></yd-lightbox-img>
|
|
<yd-lightbox-img :src=" img_http + item.content.img"></yd-lightbox-img>
|
|
|
</yd-lightbox> -->
|
|
</yd-lightbox> -->
|
|
|
<div v-if="item.type == 'error'" class="customerService left">{{item.content.text}}
|
|
<div v-if="item.type == 'error'" class="customerService left">{{item.content.text}}
|
|
|
- <div style="color:#5EA0F7;padding-left:.1rem;cursor:pointer;" @click="connectionService">请转 人工客服 咨询</div>
|
|
|
|
|
|
|
+ <div class="fontStyle" @click="connectionService">请转人工客服</div>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- </div> -->
|
|
<!-- </div> -->
|
|
|
</div>
|
|
</div>
|
|
|
<div class="HeadPortrait row center">
|
|
<div class="HeadPortrait row center">
|
|
|
<img v-if="item.type == 'user'"
|
|
<img v-if="item.type == 'user'"
|
|
|
- :src="require('@/assets/timg.jpg') ">
|
|
|
|
|
|
|
+ :src="require('@/assets/timg.jpg') ">
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -93,8 +95,19 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="messageWindow dialogueA col-w"
|
|
<div class="messageWindow dialogueA col-w"
|
|
|
:style="item.type == 'user'?'text-align: right;':''">
|
|
:style="item.type == 'user'?'text-align: right;':''">
|
|
|
- <div v-if="item.type == 'service'" class="customerService left"
|
|
|
|
|
- v-html="item.content.text"></div>
|
|
|
|
|
|
|
+ <div v-if="item.type == 'service'">
|
|
|
|
|
+ <div class="customerService left">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <span v-html="item.content.text" ></span>
|
|
|
|
|
+ <span class="fontStyle">【机器人】</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <span class="fontStyle1">问题没有解决</span>
|
|
|
|
|
+ <span @click="connectionService" class="fontStyle">请转人工客服</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <!-- <div class="fontStyle" @click="connectionService">请转人工客服咨询</div> -->
|
|
|
|
|
+ </div>
|
|
|
<div v-if="item.type == 'user'" class="user right imgSrc">
|
|
<div v-if="item.type == 'user'" class="user right imgSrc">
|
|
|
<yd-lightbox v-if="item.content.img" style="display:inline-block"
|
|
<yd-lightbox v-if="item.content.img" style="display:inline-block"
|
|
|
class="row rightAlignment box-img">
|
|
class="row rightAlignment box-img">
|
|
@@ -550,7 +563,7 @@
|
|
|
/*****************websockt心跳变量*******************/
|
|
/*****************websockt心跳变量*******************/
|
|
|
reconnectData: null,
|
|
reconnectData: null,
|
|
|
lockReconnect: false, //避免重复连接,因为onerror之后会立即触发 onclose
|
|
lockReconnect: false, //避免重复连接,因为onerror之后会立即触发 onclose
|
|
|
- timeout: 40000, //5s一次心跳检测
|
|
|
|
|
|
|
+ timeout: 5000, //5s一次心跳检测
|
|
|
timeoutObj: null,
|
|
timeoutObj: null,
|
|
|
serverTimeoutObj: null,
|
|
serverTimeoutObj: null,
|
|
|
waitingMsg: false, // 是否显示等待排队
|
|
waitingMsg: false, // 是否显示等待排队
|
|
@@ -625,6 +638,17 @@
|
|
|
socket_open() {
|
|
socket_open() {
|
|
|
console.log('我链接了');
|
|
console.log('我链接了');
|
|
|
this.$dialog.loading.close();
|
|
this.$dialog.loading.close();
|
|
|
|
|
+ //
|
|
|
|
|
+ let group_id ;
|
|
|
|
|
+ if(this.$public.getQueryString("group_id")){
|
|
|
|
|
+ group_id = this.$public.getQueryString("group_id")
|
|
|
|
|
+ }else if(sessionStorage.getItem('group_id')){
|
|
|
|
|
+ group_id = sessionStorage.getItem('group_id');
|
|
|
|
|
+ //
|
|
|
|
|
+ }
|
|
|
|
|
+ if(group_id){
|
|
|
|
|
+ this.turnArtificial(group_id)
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/*******************************************/
|
|
/*******************************************/
|
|
@@ -1090,6 +1114,7 @@
|
|
|
//转人工
|
|
//转人工
|
|
|
turnArtificial(id) {
|
|
turnArtificial(id) {
|
|
|
this.group = id;
|
|
this.group = id;
|
|
|
|
|
+ sessionStorage.setItem('group_id',this.group)
|
|
|
// this.$dialog.loading.open('转接中...')
|
|
// this.$dialog.loading.open('转接中...')
|
|
|
this.nloding('人工客服转接中');
|
|
this.nloding('人工客服转接中');
|
|
|
|
|
|
|
@@ -1638,7 +1663,14 @@
|
|
|
height: 0.6rem;
|
|
height: 0.6rem;
|
|
|
margin: 0.15rem 0.4rem;
|
|
margin: 0.15rem 0.4rem;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ .fontStyle{
|
|
|
|
|
+ color:#5EA0F7;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ }
|
|
|
|
|
+ .fontStyle1{
|
|
|
|
|
+ color:#969696;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ }
|
|
|
.dialogueA {
|
|
.dialogueA {
|
|
|
padding-left: 0.3rem;
|
|
padding-left: 0.3rem;
|
|
|
padding-right: 0.3rem;
|
|
padding-right: 0.3rem;
|