no message

This commit is contained in:
kuaifan 2022-05-23 11:35:26 +08:00
parent c53d7a5dd2
commit 3331370d14
4 changed files with 14 additions and 8 deletions

View File

@ -261,12 +261,16 @@ export default {
console.log('ws', this.ws, this.ws ? this.ws.readyState : null);
}
if (num > 0) {
this.$store.dispatch("call", {
url: 'users/ws/exist',
}).catch(_ => {
this.$store.dispatch("websocketConnection");
});
this.$store.dispatch("getBasicData", 1000)
if (this.ws === null) {
this.$store.dispatch("websocketConnection");
} else {
this.$store.dispatch("call", {
url: 'users/ws/exist',
}).catch(_ => {
this.$store.dispatch("websocketConnection");
});
}
}
}
}

View File

@ -679,7 +679,7 @@ export default {
wsOpenNum(num) {
if (num <= 1) return
this.$store.dispatch("getBasicData", 1000).then(this.getReportUnread)
this.$store.dispatch("getBasicData", 600).then(this.getReportUnread)
},
workReportShow(show) {

View File

@ -660,7 +660,9 @@ export default {
wsOpenNum(num) {
if (num <= 1) return
this.wsOpenTimeout && clearTimeout(this.wsOpenTimeout)
this.wsOpenTimeout = setTimeout(this.getFileList, 5000)
this.wsOpenTimeout = setTimeout(() => {
this.$route.name == 'manage-file' && this.getFileList();
}, 5000)
}
},

View File

@ -314,7 +314,7 @@ export default {
state.userToken = userInfo.token;
state.userIsAdmin = $A.inArray('admin', userInfo.identity);
$A.setStorage("userInfo", state.userInfo);
dispatch("getBasicData");
dispatch("getBasicData", null);
resolve()
});
},