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 })