From 33b6a7b44a9932c8427a01e6327a9ae57465c3ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B4=9B=E5=B8=8C=E9=9B=85?= Date: Fri, 26 Apr 2024 22:38:15 +0800 Subject: [PATCH] =?UTF-8?q?TAG=5FTIMESTAMP=20=E6=94=B9=E4=B8=BA=20BUILD=5F?= =?UTF-8?q?TIMESTAMP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/index.vue | 2 +- typings/env.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 838c9a6..89bed0a 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -60,7 +60,7 @@ import { ElMessage } from 'element-plus' import moment from 'moment' const buildEnv = (() => { - let time = import.meta.env.VITE_TAG_TIMESTAMP + let time = import.meta.env.VITE_BUILD_TIMESTAMP if (!time) return null const date = new Date(Number.parseInt(time)) time = `${moment(date).format('YYYY-mm-dd HH:mm:ss')} GMT+8` diff --git a/typings/env.d.ts b/typings/env.d.ts index f3c7450..d085419 100644 --- a/typings/env.d.ts +++ b/typings/env.d.ts @@ -4,7 +4,7 @@ declare global { readonly VITE_APP_BASE_URL: string readonly VITE_APP_BASE_PORT: number readonly VITE_APP_ENV: 'prod' | 'test' | 'dev' - readonly VITE_TAG_TIMESTAMP: string + readonly VITE_BUILD_TIMESTAMP: string readonly VITE_BUILD_DISPLAY_NAME: string readonly VITE_GIT_COMMIT: string // 更多环境变量...