diff --git a/.env.development b/.env.development index 9fbbe276a..ecb955784 100644 --- a/.env.development +++ b/.env.development @@ -21,3 +21,4 @@ VUE_APP_LOGOUT_PATH = '/core/auth/logout/' # Dev server for core proxy VUE_APP_CORE_HOST = 'http://localhost:8080' +VUE_APP_ENV = 'development' diff --git a/.env.production b/.env.production index 8488df683..a7a908bc1 100644 --- a/.env.production +++ b/.env.production @@ -8,4 +8,5 @@ VUE_APP_PUBLIC_PATH = '/ui' # External auth VUE_APP_LOGIN_PATH = '/core/auth/login/' VUE_APP_LOGOUT_PATH = '/core/auth/logout/' +VUE_APP_ENV = 'production' diff --git a/src/components/AutoDataZTree/index.vue b/src/components/AutoDataZTree/index.vue index 20450e933..102e14704 100644 --- a/src/components/AutoDataZTree/index.vue +++ b/src/components/AutoDataZTree/index.vue @@ -36,7 +36,7 @@ export default { defaultSetting: { async: { enable: true, - url: (process.env.ENV === 'production') ? (`${this.setting.treeUrl}`) : (`${process.env.VUE_APP_BASE_API}${this.setting.treeUrl}`), + url: (process.env.VUE_APP_ENV === 'production') ? (`${this.setting.treeUrl}`) : (`${process.env.VUE_APP_BASE_API}${this.setting.treeUrl}`), autoParam: ['id=key', 'name=n', 'level=lv'], type: 'get' },