调整目录结构

This commit is contained in:
2022-02-24 09:25:35 +08:00
parent ef785ab05f
commit 358372cdba
27 changed files with 238 additions and 217 deletions

View File

@@ -0,0 +1,36 @@
// 监听群解散的消息,直接跳转到会话列表页面
const onGroupDismiss = {
data() {
return {
currentTargetId: ''
}
},
onLoad(e) {
this.currentTargetId = e.targetId
uni.$once('onGroupDismiss_' + e.targetId, () => {
uni.showToast({
icon: 'none',
title: '当前群已解散'
})
uni.switchTab({
url: '/pages/im/index'
})
})
uni.$once('onGroupRemoveYou_' + e.targetId, () => {
uni.showToast({
icon: 'none',
title: '您已被移出群聊'
})
uni.switchTab({
url: '/pages/im/index'
})
})
},
onUnload() {
uni.$off('onGroupDismiss_' + this.currentTargetId)
uni.$off('onGroupRemoveYou_' + this.currentTargetId)
}
}
export default onGroupDismiss