@@ -11,6 +11,7 @@ module.exports = {
},
extends: ['plugin:vue/recommended', 'eslint:recommended'],
globals: {
+ __VERSION__: true,
__DEV__: true,
__PLACEHOLDER__: true,
__DELETABLE_FOR_ADMIN__: true,
@@ -1,7 +1,7 @@
{
"private": true,
- "name": "smb_management",
- "version": "0.0.0",
+ "name": "msr",
+ "version": "1.0.0",
"scripts": {
"serve": "vue-cli-service serve",
"stage": "vue-cli-service build --mode staging",
@@ -28,6 +28,8 @@ import {
} from './utils/pop'
async function startApp () {
+ document.body.setAttribute('version', __VERSION__)
+
Vue.use(Element)
Vue.component('Wrapper', Wrapper)
@@ -16,6 +16,15 @@ body {
text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
background-color: #f4f7fb;
+ &::after {
+ content: attr(version);
+ position: fixed;
+ right: 0;
+ bottom: 0;
+ color: $gray;
+ font-size: 12px;
+ }
}
*,
@@ -7,6 +7,7 @@ const port = process.env.port || 9527
const isProd = process.env.NODE_ENV !== 'development'
const features = {
+ __VERSION__: JSON.stringify(`v${require('./package.json').version}.${getTimestamp()}`),
// 未开发完的路由
__DEV__: !isProd,
// 未开发的功能组件
@@ -14,7 +15,7 @@ const features = {
// 可删除已提交审核的数据
// 传感器
- __SENSOR__: !isProd || true,
+ __SENSOR__: !isProd || false,
__IMDS_ELK__: false
@@ -34,6 +35,11 @@ function getCopyFiles () {
})
+function getTimestamp () {
+ const now = new Date()
+ return `${now.getFullYear()}${(now.getMonth() + 1).toString().padStart(2, '0')}${now.getDate().toString().padStart(2, '0')}${now.getHours().toString().padStart(2, '0')}${now.getMinutes().toString().padStart(2, '0')}${now.getSeconds().toString().padStart(2, '0')}`
+}
module.exports = {
publicPath: '/',
outputDir: 'dist',