提交 d68e5f32 编写于 作者: 张磊's avatar 张磊

Merge branch 'feature/zl' into 'release'

Feature/zl

See merge request !230
...@@ -617,10 +617,32 @@ ...@@ -617,10 +617,32 @@
if (!res.data) { if (!res.data) {
return false; return false;
} }
const l = res.data.map((i) => { let l = res.data.map((i) => {
return i.userId; return i.userId;
}); });
// l = [1089725294, 1089728785];
// that.memberList = [
// {
// accId: 'd_3651506947_uat',
// avatarImageUrl: 'https://test-file.yunqueyi.com/File/doctor_default.png',
// id: 1089725294,
// liveUserId: 'd_3651506947_uat_1089725294',
// name: '顾超',
// role: 2,
// status: 3,
// type: 1
// },
// {
// accId: 'd_1909506947_uat',
// avatarImageUrl: 'https://test-file.yunqueyi.com/File/doctor_default.png',
// id: 1089728785,
// liveUserId: 'd_1909506947_uat_1089728785',
// name: '陈影',
// role: 1,
// status: 3,
// type: 1,
// }
// ];
if ( if (
l && l &&
l.length > 0 && l.length > 0 &&
...@@ -629,8 +651,8 @@ ...@@ -629,8 +651,8 @@
) { ) {
that.memberList.map((i) => { that.memberList.map((i) => {
console.log('res==---', l, i, that.memberList, l.includes[i.id]); console.log('res==---', l, i.id, l.includes(i.id));
if (l.includes[i.id]) { if (l.includes(i.id)) {
// 在线 更新状态 // 在线 更新状态
that.addNewMember(i.liveUserId); that.addNewMember(i.liveUserId);
} else { } else {
...@@ -644,6 +666,14 @@ ...@@ -644,6 +666,14 @@
} }
} }
}); });
}else {
if( that.memberList &&
that.memberList.length > 0) {
that.memberList.map( i => {
that.removeMember(i.liveUserId);
});
}
} }
}); });
}, 2000); }, 2000);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册