Browse Source

修改客服登录筛选换个浏览器无效问题

master
[yxf] 3 weeks ago
parent
commit
d64145a3fb
  1. 2
      im-web/src/components/account/AccountSwitchMenu.vue
  2. 10
      im-web/src/store/chatStore.js

2
im-web/src/components/account/AccountSwitchMenu.vue

@ -55,7 +55,7 @@
{{ account.nickName }} {{ account.nickName }}
</div> </div>
<div class="account-name">@{{ account.userName }}</div> <div class="account-name">@{{ account.userName }}</div>
<div class="account-id">ID: {{ account.id }}</div> <!-- <div class="account-id">ID: {{ account.id }}</div> -->
</div> </div>
<div class="account-actions"> <div class="account-actions">
<el-button <el-button

10
im-web/src/store/chatStore.js

@ -373,6 +373,16 @@ export default defineStore('chatStore', {
let chats = cacheChats || this.chats; let chats = cacheChats || this.chats;
// 刷新免打扰状态 // 刷新免打扰状态
const friendStore = useFriendStore(); const friendStore = useFriendStore();
const onlineFriendIds = friendStore.onlineFriendIds || [];
chats = chats.filter(chat => {
// 保留群聊
if (chat.type === 'GROUP') return true;
// 私聊只保留在线好友的
if (chat.type === 'PRIVATE') {
return onlineFriendIds.includes(chat.targetId);
}
return true;
});
const groupStore = useGroupStore(); const groupStore = useGroupStore();
chats.forEach(chat => { chats.forEach(chat => {
if (chat.type == 'PRIVATE') { if (chat.type == 'PRIVATE') {

Loading…
Cancel
Save