diff --git a/src/components/LockScreen/index.vue b/src/components/LockScreen/index.vue index b4eeddf5..0c66731e 100644 --- a/src/components/LockScreen/index.vue +++ b/src/components/LockScreen/index.vue @@ -53,30 +53,30 @@ function backLogin() { const isLocked = computed(() => lockedStore.type !== 'none'); onMounted(() => { - getConfigKey('sys.lockTime') - .then(res => { - if (res.code === RESULT_CODE_SUCCESS && res.data) { - lockedStore.lockTimeout = res.data; - timeoutDuration = res.data * 1000; - } - // 本地锁定类型设置 - lockedStore.fnLock(lockedStore.type); - }) - .finally(() => { - if (timeoutDuration !== 0) { - resetTimeout(); - // 监听用户的操作,重置超时时间 - window.addEventListener('mousemove', resetTimeout); - window.addEventListener('keydown', resetTimeout); - } - }); + // getConfigKey('sys.lockTime') + // .then(res => { + // if (res.code === RESULT_CODE_SUCCESS && res.data) { + // lockedStore.lockTimeout = res.data; + // timeoutDuration = res.data * 1000; + // } + // // 本地锁定类型设置 + // lockedStore.fnLock(lockedStore.type); + // }) + // .finally(() => { + // if (timeoutDuration !== 0) { + // resetTimeout(); + // // 监听用户的操作,重置超时时间 + // window.addEventListener('mousemove', resetTimeout); + // window.addEventListener('keydown', resetTimeout); + // } + // }); }); /**组件实例被卸载之后调用 */ onUnmounted(() => { - if (timeoutId) { - clearTimeout(timeoutId); - } + // if (timeoutId) { + // clearTimeout(timeoutId); + // } }); - +