客服后台限制展示聊天条数

pull/23/head
taoshihan1991 4 years ago
parent 477fe9eca2
commit 197d83607a

@ -86,6 +86,7 @@
>
</el-alert>
<div class="funcBtns" v-show="visitor.visitor_id">
<el-button v-on:click="getMesssagesByVisitorId(visitor.visitor_id,true)" size="small" type="success" plain icon="el-icon-user">聊天记录</el-button>
<el-button v-on:click="transKefu" size="small" type="success" plain icon="el-icon-position">转接</el-button>
<el-button v-on:click="closeVisitor(visitor.visitor_id)" size="small" type="success" plain icon="el-icon-close">结束</el-button>
</div>

@ -323,7 +323,7 @@ var app=new Vue({
});
},
//获取信息列表
getMesssagesByVisitorId(visitorId){
getMesssagesByVisitorId(visitorId,isAll){
let _this=this;
$.ajax({
type:"get",
@ -335,7 +335,12 @@ var app=new Vue({
if(data.code==200 && data.result!=null){
let msgList=data.result;
_this.msgList=[];
for(let i=0;i<msgList.length;i++){
if(!isAll){
var i=msgList.length-10
}else{
var i=0;
}
for(;i<msgList.length;i++){
let visitorMes=msgList[i];
let content = {}
if(visitorMes["mes_type"]=="kefu"){

Loading…
Cancel
Save