IM的链接和断开时机调整,APP打开自动判断登录,链接。退出登录后断开链接

新朋友数量提醒
This commit is contained in:
2022-01-28 11:24:10 +08:00
parent 8e047408e2
commit f9e2819cc7
7 changed files with 728 additions and 615 deletions

View File

@@ -102,12 +102,8 @@
}
},
onShow() {
if (this.$store.state.token !== '') {
getImToken().then(res => {
im.connect(res.token, res.userInfo, () => {
this.getConversationList()
})
})
if (this.$store.state.token !== '') {
this.getConversationList()
}
this.isShown = true
},