Skip to content

Commit

Permalink
环境变量增加模型域名
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangmrit committed Jan 16, 2020
1 parent 6538c27 commit 3fc27bd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
NODE_ENV=production
VUE_APP_PREVIEW=false
VUE_APP_API_BASE_URL=/api
VUE_APP_MODEL_BASE_URL=http://act.zmrit.com
3 changes: 2 additions & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
NODE_ENV=development
VUE_APP_PREVIEW=true
VUE_APP_API_BASE_URL=/api
VUE_APP_API_BASE_URL=/api
VUE_APP_MODEL_BASE_URL=http://127.0.0.1:8004
3 changes: 2 additions & 1 deletion .env.preview
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
NODE_ENV=production
VUE_APP_PREVIEW=true
VUE_APP_API_BASE_URL=/api
VUE_APP_API_BASE_URL=/api
VUE_APP_MODEL_BASE_URL=http://act.zmrit.com
6 changes: 3 additions & 3 deletions src/views/activiti/ModelList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
import { STable } from '@/components'
import { getModelList, delModel, deploy } from '@/api/activiti'
import { checkPermission } from '@/utils/permissions'
const modelerBaseUrl = process.env.VUE_APP_MODEL_BASE_URL
export default {
name: 'ModelList',
components: {
Expand Down Expand Up @@ -158,11 +158,11 @@ export default {
},
handleAdd () {
this.modelVisible = true
this.modelerUrl = 'http://act.zmrit.com/models/newModel?time=' + new Date().getTime()
this.modelerUrl = modelerBaseUrl + '/models/newModel?time=' + new Date().getTime()
},
handleEdit (id) {
this.modelVisible = true
this.modelerUrl = 'http://act.zmrit.com/modeler.html?modelId=' + id
this.modelerUrl = modelerBaseUrl + '/modeler.html?modelId=' + id + '&time=' + new Date().getTime()
},
handleOk () {
this.$refs.table.refresh(true)
Expand Down

0 comments on commit 3fc27bd

Please sign in to comment.