客服后台关闭访客

pull/23/head
taoshihan1991 4 years ago
parent b786521ce6
commit 1756875ee3

@ -170,10 +170,12 @@
<i class="el-icon-s-tools"></i>
<span slot="title">时间:<{visitor.created_at}></span>
</el-menu-item>
<el-menu-item style="padding-left:2px;">
<i class="el-icon-s-tools"></i>
<span slot="title">状态:<{visitor.status}></span>
</el-menu-item>
<el-tooltip content="点击关闭连接" placement="left">
<el-menu-item v-on:click="closeVisitor(visitor.visitor_id)" style="padding-left:2px;">
<i class="el-icon-s-tools"></i>
<span slot="title">状态:<{visitor.status}></span>
</el-menu-item>
</el-tooltip>
</el-menu>
</el-tab-pane>
<el-tab-pane label="黑名单" name="blackList">

@ -20,6 +20,7 @@ var app=new Vue({
to_id : "",
},
visitor:{
visitor_id:"",
refer:"",
client_ip:"",
city:"",
@ -337,6 +338,7 @@ var app=new Vue({
_this.visitor.client_ip=r.client_ip;
_this.visitor.source_ip=r.source_ip;
_this.visitor.status=r.status==1?"在线":"离线";
_this.visitor.visitor_id=r.visitor_id;
}
if(data.code!=200){
_this.$message({
@ -347,6 +349,26 @@ var app=new Vue({
}
});
},
//关闭访客
closeVisitor(visitorId){
let _this=this;
$.ajax({
type:"get",
url:"/message_close",
data:{visitor_id:visitorId},
headers:{
"token":localStorage.getItem("token")
},
success: function(data) {
if(data.code!=200){
_this.$message({
message: data.msg,
type: 'error'
});
}
}
});
},
//处理tab切换
handleTabClick(tab, event){
let _this=this;

Loading…
Cancel
Save