Commit ff684449 authored by linwenqing's avatar linwenqing

refactor:配置版本号信息

parent 78504518
;(function() {
let NODE_ENV = 'dev' // dev:开发环境 | test:测试环境 | prod:生产环境
let NODE_ENV = 'test' // dev:开发环境 | test:测试环境 | prod:生产环境
let ENV_VAR = null
let VERSION = 'v1.0.0'
if (process.env.NODE_ENV === 'development') {
if (NODE_ENV === 'dev') {
ENV_VAR = require('./.env.dev.js')
......@@ -21,6 +22,7 @@
if (ENV_VAR) {
process.uniEnv = {}
process.uniEnv['node_env'] = NODE_ENV
process.uniEnv['version'] = VERSION
for (let key in ENV_VAR) {
process.uniEnv[key] = ENV_VAR[key]
}
......
......@@ -3,7 +3,7 @@
<u-cell-group class="cell-group" :border="false">
<u-cell-item
title="版本更新"
value="当前版本v1.1.0"
:value="newVersion"
:border-bottom="false"
@tap="upgrade"
></u-cell-item>
......@@ -15,7 +15,9 @@
<script>
export default {
data() {
return {}
return {
newVersion: '当前版本' + process.uniEnv.version,
}
},
computed: {},
onLoad() {},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment