消息列表优化
This commit is contained in:
@@ -142,9 +142,6 @@ export default {
|
||||
},
|
||||
onLoad(options) {
|
||||
this.init()
|
||||
setInterval(() => {
|
||||
this.messageCount = uni.getStorageSync(this.$cacheKey.messageCount) || {}
|
||||
}, 3000) // 定时请求
|
||||
},
|
||||
methods: {
|
||||
init() {},
|
||||
@@ -251,7 +248,7 @@ export default {
|
||||
this.messageCount = uni.getStorageSync(this.$cacheKey.messageCount) || {}
|
||||
this.timer = setInterval(() => {
|
||||
this.messageCount = uni.getStorageSync(this.$cacheKey.messageCount) || {}
|
||||
}, 3000) // 定时请求
|
||||
}, 1000) // 定时请求
|
||||
},
|
||||
onHide() {
|
||||
clearInterval(this.timer)
|
||||
|
||||
Reference in New Issue
Block a user