From 824b3ce67c7011f55b922315fd89866c86159343 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Wed, 20 Aug 2025 18:06:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=89=88=E6=9C=AC=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 10 ++++- index.html | 6 +++ src/main.js | 10 +++++ src/utils/versionChecker.js | 71 ++++++++++++++++++++++++++++++++++++ src/views/HostCenterView.vue | 2 +- vite.config.js | 18 +++++++++ 6 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 src/utils/versionChecker.js diff --git a/.env b/.env index 9056d20..437c9ae 100644 --- a/.env +++ b/.env @@ -1,2 +1,8 @@ -# 默认环境(开发环境) -VITE_NODE_ENV=development +# 应用版本号 +VITE_APP_VERSION=1.0.0 + +# 构建时间戳(会在构建时自动更新) +VITE_BUILD_TIME="" + +# 是否启用版本检查 +VITE_ENABLE_VERSION_CHECK=true diff --git a/index.html b/index.html index 5b3a718..e87e5ca 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,12 @@ + + + + + +