|
|
@ -134,6 +134,7 @@ var app=new Vue({
|
|
|
|
for(let i=0;i<this.users.length;i++){
|
|
|
|
for(let i=0;i<this.users.length;i++){
|
|
|
|
if(this.users[i].uid==msg.id){
|
|
|
|
if(this.users[i].uid==msg.id){
|
|
|
|
this.$set(this.users[i],'last_message',msg.content);
|
|
|
|
this.$set(this.users[i],'last_message',msg.content);
|
|
|
|
|
|
|
|
this.$set(this.users[i],'hidden_new_message',false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.scrollBottom();
|
|
|
|
this.scrollBottom();
|
|
|
@ -165,6 +166,11 @@ var app=new Vue({
|
|
|
|
this.getVistorInfo(guestId);
|
|
|
|
this.getVistorInfo(guestId);
|
|
|
|
//获取当前客户消息
|
|
|
|
//获取当前客户消息
|
|
|
|
this.getMesssagesByVisitorId(guestId);
|
|
|
|
this.getMesssagesByVisitorId(guestId);
|
|
|
|
|
|
|
|
for(var i=0;i<this.users.length;i++){
|
|
|
|
|
|
|
|
if(this.users[i].uid==guestId){
|
|
|
|
|
|
|
|
this.$set(this.users[i],'hidden_new_message',true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//发送给客户
|
|
|
|
//发送给客户
|
|
|
|
chatToUser() {
|
|
|
|
chatToUser() {
|
|
|
|