From 467c93f710300f1677d11dd38f0f77fa38442c8e Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Fri, 31 May 2024 11:05:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=94=81=E5=B1=8F=E9=87=8D=E5=90=AF?= =?UTF-8?q?=E6=A3=80=E6=9F=A5404=E6=97=B6=E9=87=8D=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/locked.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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') {