diff --git a/src/components/LockScreen/index.vue b/src/components/LockScreen/index.vue index 2c3eec46..f8dfdd74 100644 --- a/src/components/LockScreen/index.vue +++ b/src/components/LockScreen/index.vue @@ -59,17 +59,17 @@ onMounted(() => { lockedStore.lockTimeout = res.data; timeoutDuration = res.data * 1000; } + console.log(lockedStore.type); + // 本地锁定类型设置 + lockedStore.fnLock(lockedStore.type); }) - .then(() => { + .finally(() => { if (timeoutDuration !== 0) { resetTimeout(); // 监听用户的操作,重置超时时间 window.addEventListener('mousemove', resetTimeout); window.addEventListener('keydown', resetTimeout); } - console.log(lockedStore.type) - // 本地锁定类型设置 - lockedStore.fnLock(lockedStore.type); }); });