消息列表刷新
This commit is contained in:
@@ -103,9 +103,6 @@
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
uni.$on('onReceiveMessage', (msg) => {
|
||||
this.getConversationList()
|
||||
})
|
||||
uni.$on('onConnectionStatusChange', (status) => {
|
||||
this.connection = status
|
||||
})
|
||||
@@ -113,10 +110,15 @@
|
||||
onShow() {
|
||||
if (this.$store.state.token !== '') {
|
||||
this.getConversationList()
|
||||
}
|
||||
}
|
||||
uni.$on('onReceiveMessage', (msg) => {
|
||||
console.log('收到消息,刷新列表');
|
||||
this.getConversationList()
|
||||
})
|
||||
this.isShown = true
|
||||
},
|
||||
onHide() {
|
||||
onHide() {
|
||||
uni.$off('onReceiveMessage')
|
||||
this.isShown = false
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
|
||||
@@ -108,9 +108,6 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
uni.$off('onReceiveMessage')
|
||||
},
|
||||
methods: {
|
||||
initMessageList() {
|
||||
this.getMessageList()
|
||||
|
||||
Reference in New Issue
Block a user