资料修改的事件通知

This commit is contained in:
2022-02-23 16:06:41 +08:00
parent c840e9ee6b
commit a5bd5a898c
4 changed files with 55 additions and 17 deletions

View File

@@ -21,11 +21,11 @@
import sentMessageBar from '../components/sentMessageBar'
import showMessageCell from '../components/showMessageCell'
import utils from '@/utils/index.js'
import onGroupDismiss from '@/utils/im/onGroupDismiss.js'
export default {
mixins: [
onGroupDismiss
import onGroupDismiss from '@/utils/im/onGroupDismiss.js'
export default {
mixins: [
onGroupDismiss
],
components: {
sentMessageBar,
@@ -55,12 +55,7 @@
},
onLoad(e) {
this.targetId = e.targetId
// 获取群成员数量
getGroupBase(this.targetId).then(res => {
uni.setNavigationBarTitle({
title: res.name + `(${res.members})`
})
})
this.initGroupInfo()
// 获取历史消息列表
this.getMessageList()
// 监听新消息
@@ -103,7 +98,8 @@
})
},
onUnload() {
uni.$off('onReceiveMessage_' + this.targetId)
uni.$off('onReceiveMessage_' + this.targetId)
uni.$off('onUpdateProfile_' + this.targetId)
uni.$off('onRecallMessage')
uni.$off('onReceiptRequest')
uni.$off('onReceiptResponse')
@@ -114,6 +110,14 @@
})
},
methods: {
initGroupInfo() {
// 获取群信息,成员数量,设置标题
getGroupBase(this.targetId).then(res => {
uni.setNavigationBarTitle({
title: res.name + `(${res.members})`
})
})
},
onScroll(e) {
this.$refs.messageBar.onHidePopus()
},