Commit 816db42c authored by 王伟's avatar 王伟

聊天页面定时任务

parent 4978a6bd
...@@ -232,12 +232,13 @@ export default { ...@@ -232,12 +232,13 @@ export default {
mounted () { mounted () {
// console.log(this.$refs.im_chat.$re) // console.log(this.$refs.im_chat.$re)
// this.$refs.im_chat.goEnd() // this.$refs.im_chat.goEnd()
const timers = setInterval(() => { // const timers = setInterval(() => {
this.requestData() // this.requestData()
}, 1500) // }, 1500)
this.$once('hook:beforeDestroy', () => { // this.$once('hook:beforeDestroy', () => {
clearInterval(timers) // clearInterval(timers)
}) // })
this.requestData()
this.initTold() this.initTold()
}, },
beforeDestroyed () { beforeDestroyed () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment