Browse Source

修复异地登录bug

master
xie.bx 2 years ago
parent
commit
e27e7b316c
  1. 6
      im-ui/src/view/Home.vue

6
im-ui/src/view/Home.vue

@ -87,8 +87,6 @@
this.pullUnreadMessage(); this.pullUnreadMessage();
}); });
this.$wsApi.onmessage((cmd, msgInfo) => { this.$wsApi.onmessage((cmd, msgInfo) => {
//
msgInfo.selfSend = msgInfo.sendId==this.$store.state.userStore.userInfo.id;
if (cmd == 2) { if (cmd == 2) {
// 线 // 线
this.$message.error("您已在其他地方登陆,将被强制下线"); this.$message.error("您已在其他地方登陆,将被强制下线");
@ -96,9 +94,13 @@
location.href = "/"; location.href = "/";
}, 1000) }, 1000)
} else if (cmd == 3) { } else if (cmd == 3) {
//
msgInfo.selfSend = msgInfo.sendId==this.$store.state.userStore.userInfo.id;
// //
this.handlePrivateMessage(msgInfo); this.handlePrivateMessage(msgInfo);
} else if (cmd == 4) { } else if (cmd == 4) {
//
msgInfo.selfSend = msgInfo.sendId==this.$store.state.userStore.userInfo.id;
// //
this.handleGroupMessage(msgInfo); this.handleGroupMessage(msgInfo);
} }

Loading…
Cancel
Save