TAG_TIMESTAMP 改为 BUILD_TIMESTAMP

This commit is contained in:
洛洛希雅 2024-04-26 22:38:15 +08:00
parent dc7e3d6820
commit 33b6a7b44a
2 changed files with 2 additions and 2 deletions

View File

@ -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`

2
typings/env.d.ts vendored
View File

@ -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
// 更多环境变量...