From 40a3f40f7d2ba97d7271e6169d184c6fea824578 Mon Sep 17 00:00:00 2001 From: jiangx <1457960500@qq.com> Date: Thu, 27 Apr 2023 11:08:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=A7=A9=20=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=B1=8F=E4=BF=9D=E6=97=B6=E9=97=B4=E8=AE=BE=E7=BD=AE=E4=B8=BA?= =?UTF-8?q?0=E6=97=B6=20=E5=BC=B9=E6=A1=86=E7=9B=B4=E6=8E=A5=E5=87=BA?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/Message/Message.vue | 5 +---- src/composables/useHandleScreen.ts | 5 +++-- src/router/index.ts | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/base/Message/Message.vue b/src/base/Message/Message.vue index b920e67..14d5351 100644 --- a/src/base/Message/Message.vue +++ b/src/base/Message/Message.vue @@ -59,15 +59,12 @@ onMounted(() => { top: 200px; left: 50%; z-index: 9999; - min-width: 300px; - height: 50px; - padding: 0 25px; + padding: 40px 80px; color: #999; background: #f5f5f5; border: 1px solid #e4e4e4; border-radius: 100px; transform: translate3d(-50%, 0, 0); - line-height: 50px; .text-tips { font-size: 24px; diff --git a/src/composables/useHandleScreen.ts b/src/composables/useHandleScreen.ts index 15bd85e..25a8f20 100644 --- a/src/composables/useHandleScreen.ts +++ b/src/composables/useHandleScreen.ts @@ -84,9 +84,10 @@ export const useHandleScreen = (callback: () => void) => { onMounted(() => { //获取返回首页和进入屏保的具体时间 getBackTime().then(({ data }) => { - totalTime.value = data + const noWallpaper = data[1] === 0 + totalTime.value = noWallpaper ? [data[0], -1] : data toIndexTime.value = data[0] - toWallpaperTime.value = data[1] + toWallpaperTime.value = noWallpaper ? -1 : data[1] }) }) return { diff --git a/src/router/index.ts b/src/router/index.ts index 0af01f7..19b38f2 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -2,7 +2,7 @@ import { createRouter, createWebHashHistory } from 'vue-router' import { routes } from './routes' import type { App } from 'vue' -const router = createRouter({ +export const router = createRouter({ history: createWebHashHistory(), routes })