mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-06 09:27:05 +00:00
no message
This commit is contained in:
parent
972c01bd67
commit
2e6eb81648
@ -266,7 +266,7 @@ export default {
|
||||
}).catch(_ => {
|
||||
this.$store.dispatch("websocketConnection");
|
||||
});
|
||||
this.$store.dispatch("getBasicData", 5000)
|
||||
this.$store.dispatch("getBasicData", 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -679,7 +679,7 @@ export default {
|
||||
|
||||
wsOpenNum(num) {
|
||||
if (num <= 1) return
|
||||
this.$store.dispatch("getBasicData", 5000).then(this.getReportUnread)
|
||||
this.$store.dispatch("getBasicData", 1000).then(this.getReportUnread)
|
||||
},
|
||||
|
||||
workReportShow(show) {
|
||||
|
||||
@ -160,7 +160,11 @@ export default {
|
||||
},
|
||||
|
||||
activated() {
|
||||
this.updateDialogs();
|
||||
this.updateDialogs(1000);
|
||||
},
|
||||
|
||||
deactivated() {
|
||||
this.updateDialogs(-1);
|
||||
},
|
||||
|
||||
computed: {
|
||||
@ -285,7 +289,7 @@ export default {
|
||||
if (val == 'contacts') {
|
||||
this.contactsData === null && this.getContactsList(1);
|
||||
} else {
|
||||
this.updateDialogs();
|
||||
this.updateDialogs(1000);
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
@ -537,13 +541,16 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
updateDialogs() {
|
||||
updateDialogs(timeout) {
|
||||
this.__updateDialogs && clearTimeout(this.__updateDialogs)
|
||||
this.__updateDialogs = setTimeout(_ => {
|
||||
if (this.tabActive === 'dialog') {
|
||||
this.$store.dispatch("getDialogs", true).catch(() => {});
|
||||
}
|
||||
}, 2000)
|
||||
if (timeout > -1) {
|
||||
this.__updateDialogs = setTimeout(_ => {
|
||||
if (this.tabActive === 'dialog') {
|
||||
this.$store.dispatch("getDialogs", true).catch(() => {
|
||||
});
|
||||
}
|
||||
}, timeout)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user