fix: 锁屏重启判断

This commit is contained in:
TsMask
2024-01-18 11:42:34 +08:00
parent 13738d5b4e
commit 4d7d31f784
2 changed files with 5 additions and 9 deletions

View File

@@ -61,19 +61,15 @@ onMounted(() => {
timeoutDuration = res.data * 1000;
}
})
.finally(() => {
.then(() => {
if (timeoutDuration !== 0) {
resetTimeout();
// 监听用户的操作,重置超时时间
window.addEventListener('mousemove', resetTimeout);
window.addEventListener('keydown', resetTimeout);
}
// 本地锁定同时是登录状态
if (lockedStore.type === 'lock' && getToken()) {
lockedStore.fnLock('lock');
} else if (lockedStore.type === 'reload') {
lockedStore.relaodWait();
}
// 本地锁定同时是登录状态
lockedStore.fnLock(lockedStore.type);
});
});