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