diff --git a/src/store/modules/locked.ts b/src/store/modules/locked.ts index 1f7ef276..977e0cb3 100644 --- a/src/store/modules/locked.ts +++ b/src/store/modules/locked.ts @@ -7,7 +7,7 @@ import { defineStore } from 'pinia'; /**锁屏信息类型 */ type Locked = { /**锁屏类型 */ - type: 'none' | 'lock' | 'reload' | 'reset' ; + type: 'none' | 'lock' | 'reload' | 'reset'; /**lock 超时锁屏时间,秒*/ lockTimeout: number; }; @@ -29,6 +29,11 @@ const useLockedStore = defineStore('locked', { this.fnLock('none'); window.location.reload(); }, 2_000); + } else { + // 延迟5秒 + setTimeout(() => { + this.relaodWait(); + }, 5_000); } } catch (error) { // 延迟5秒 @@ -38,7 +43,7 @@ const useLockedStore = defineStore('locked', { } }, // 设置锁定 - async fnLock(type: Locked['type'] ) { + async fnLock(type: Locked['type']) { this.type = type; localSet(CACHE_LOCAL_LOCK, type); if (type === 'reload') {