From 78c65f40c6423b14416500726333d6c104be8cd1 Mon Sep 17 00:00:00 2001 From: jiangx <1457960500@qq.com> Date: Mon, 15 May 2023 13:56:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=A7=A9=20=E5=B1=8F=E4=BF=9D?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E4=B8=BA0=E4=B8=94=E5=9C=A8=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E6=97=B6=20=E5=85=A8=E5=B1=80=E5=BC=B9=E6=A1=86?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/composables/useHandleScreen.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/composables/useHandleScreen.ts b/src/composables/useHandleScreen.ts index 25a8f20..24cb96e 100644 --- a/src/composables/useHandleScreen.ts +++ b/src/composables/useHandleScreen.ts @@ -67,6 +67,11 @@ export const useHandleScreen = (callback: () => void) => { await sleepToIndex() callback() } + + //没有屏保的话不允许弹出屏保弹框 TODO:后期由容器通知 + if (toWallpaperTime.value === -1) { + return + } await sleepToWallpaper() callback() }, DELAY_CHECK_TIME) @@ -84,7 +89,7 @@ export const useHandleScreen = (callback: () => void) => { onMounted(() => { //获取返回首页和进入屏保的具体时间 getBackTime().then(({ data }) => { - const noWallpaper = data[1] === 0 + const noWallpaper = data[1] totalTime.value = noWallpaper ? [data[0], -1] : data toIndexTime.value = data[0] toWallpaperTime.value = noWallpaper ? -1 : data[1]