消息修改
This commit is contained in:
@@ -114,6 +114,7 @@ export default {
|
||||
loading: true,
|
||||
userInfo: {},
|
||||
messageCount: {},
|
||||
timer: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -143,7 +144,7 @@ export default {
|
||||
this.init()
|
||||
setInterval(() => {
|
||||
this.messageCount = uni.getStorageSync(this.$cacheKey.messageCount) || {}
|
||||
}, 10000) // 定时请求
|
||||
}, 3000) // 定时请求
|
||||
},
|
||||
methods: {
|
||||
init() {},
|
||||
@@ -248,6 +249,12 @@ export default {
|
||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
this.loading = false
|
||||
this.messageCount = uni.getStorageSync(this.$cacheKey.messageCount) || {}
|
||||
this.timer = setInterval(() => {
|
||||
this.messageCount = uni.getStorageSync(this.$cacheKey.messageCount) || {}
|
||||
}, 3000) // 定时请求
|
||||
},
|
||||
onHide() {
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user