字段修改,定时刷新

This commit is contained in:
2024-03-07 10:17:05 +08:00
parent 3dc2f2a8fb
commit d70138ad76
2 changed files with 20 additions and 12 deletions

View File

@@ -31,12 +31,19 @@
export default {
data() {
return {
intervalId: null,
userName: this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).username : '',
menuList: []
};
},
created () {
onLoad () {
this._getBillsCount()
this.intervalId = setInterval(this._getBillsCount, this.$store.getters.setTime)
},
onUnload () {
if (this.intervalId) {
clearInterval(this.intervalId)
}
},
methods: {
async _getBillsCount () {