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