diff --git a/src/App.vue b/src/App.vue index 03441f4e..390ad816 100644 --- a/src/App.vue +++ b/src/App.vue @@ -64,6 +64,7 @@ export default { }; }, created: function () { + console.log('版本编译时间:', process.env.BUILD_TIME); if ( document.getElementById("Loading") != null && document.getElementById("Loading").nodeName != null && diff --git a/vue.config.js b/vue.config.js index 55af1d7e..3296ecd9 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,5 +1,6 @@ const path = require('path'); const webpack = require('webpack'); +const dayjs = require('dayjs'); module.exports = { configureWebpack: { @@ -24,7 +25,7 @@ module.exports = { NODE_ENV: '"development"', API_HOST: '"/api/"', // API_HOST: '"http://47.104.91.134:9000/api/"', - + BUILD_TIME: `"${dayjs().format('YYYY.MM.DD HH:mm')}"`, } }), ],