mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-26 08:45:08 +08:00
【新增】:mall 客服接入 websocket 实现消息实时拉取
This commit is contained in:
@ -55,22 +55,6 @@ const openRightMessage = (item: KeFuConversationRespVO, index: number) => {
|
||||
activeConversationIndex.value = index
|
||||
emits('change', item)
|
||||
}
|
||||
const poller = ref<any>(null) // TODO puhui999: 轮训定时器,暂时模拟 websocket
|
||||
onMounted(() => {
|
||||
// TODO puhui999: 轮训相关,功能完善后移除
|
||||
if (!poller.value) {
|
||||
poller.value = setInterval(() => {
|
||||
getConversationList()
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
// TODO puhui999: 轮训相关,功能完善后移除
|
||||
onBeforeUnmount(() => {
|
||||
if (!poller.value) {
|
||||
return
|
||||
}
|
||||
clearInterval(poller.value)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
Reference in New Issue
Block a user