fix: 锁屏reload延迟解除防止二次重启导致服务失败

This commit is contained in:
TsMask
2024-04-18 09:34:25 +08:00
parent 19a9bd3f5c
commit 9bbeb9fc9a

View File

@@ -24,8 +24,11 @@ const useLockedStore = defineStore('locked', {
try {
const res = await getSysConf();
if (res.code === RESULT_CODE_SUCCESS && res.data) {
this.fnLock('none');
window.location.reload();
// 延迟5秒
setTimeout(() => {
this.fnLock('none');
window.location.reload();
}, 2_000);
}
} catch (error) {
// 延迟5秒