From 327c28d8308f6343984e1af71f7e5f7087e303e9 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Wed, 3 Jul 2024 23:18:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=85=E7=94=9F=E4=BA=A7=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E6=A3=80=E6=9F=A5=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/plugins/app-info.ts | 2 +- src/layout/index.vue | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/config/plugins/app-info.ts b/config/plugins/app-info.ts index 3c8a4ff..54e3d63 100644 --- a/config/plugins/app-info.ts +++ b/config/plugins/app-info.ts @@ -11,7 +11,7 @@ export default function appInfo(): Plugin { // eslint-disable-next-line no-console console.log( boxen( - `${bold(green(`${bgGreen('ContiNew Admin v3.1.0-SNAPSHOT')}`))}\n${cyan('在线文档:')}${underline('https://continew.top')}\n${cyan('持续迭代优化的前后端分离中后台管理系统框架。')}`, + `${bold(green(`${bgGreen('ContiNew Admin v3.2.0-SNAPSHOT')}`))}\n${cyan('在线文档:')}${underline('https://continew.top')}\n${cyan('持续迭代优化的前后端分离中后台管理系统框架。')}`, { padding: 1, margin: 1, diff --git a/src/layout/index.vue b/src/layout/index.vue index 775354a..8c20113 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -65,13 +65,18 @@ const compareTag = async () => { } } +const isProd = import.meta.env.PROD onMounted(() => { - // 每60秒检查一次是否有新的 ETag 或 Last-Modified 值 - timer = setInterval(compareTag, 6000) + if (isProd) { + // 每60秒检查一次是否有新的 ETag 或 Last-Modified 值 + timer = setInterval(compareTag, 6000) + } }) onUnmounted(() => { - // 清除定时器 - clearInterval(timer) + if (isProd) { + // 清除定时器 + clearInterval(timer) + } })