|
|
@ -195,15 +195,25 @@ var app=new Vue({
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//处理当前在线用户列表
|
|
|
|
//处理当前在线用户列表
|
|
|
|
addOnlineUser:function (retData) {
|
|
|
|
addOnlineUser:function (retData) {
|
|
|
|
|
|
|
|
var flag=false;
|
|
|
|
retData.last_message="新访客";
|
|
|
|
retData.last_message="新访客";
|
|
|
|
let vid=retData.uid;
|
|
|
|
retData.status=1;
|
|
|
|
this.users.push(retData);
|
|
|
|
retData.name=retData.username;
|
|
|
|
|
|
|
|
for(let i=0;i<this.users.length;i++){
|
|
|
|
|
|
|
|
if(this.users[i].uid==retData.uid){
|
|
|
|
|
|
|
|
flag=true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!flag){
|
|
|
|
|
|
|
|
this.users.unshift(retData);
|
|
|
|
|
|
|
|
}
|
|
|
|
for(let i=0;i<this.visitors.length;i++){
|
|
|
|
for(let i=0;i<this.visitors.length;i++){
|
|
|
|
if(this.visitors[i].visitor_id==vid){
|
|
|
|
if(this.visitors[i].visitor_id==retData.uid){
|
|
|
|
this.visitors[i].status=1;
|
|
|
|
this.visitors[i].status=1;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//处理当前在线用户列表
|
|
|
|
//处理当前在线用户列表
|
|
|
|
removeOfflineUser:function (retData) {
|
|
|
|
removeOfflineUser:function (retData) {
|
|
|
|