diff --git a/frontend/src/business/components/api/definition/components/environment/EnvironmentEdit.vue b/frontend/src/business/components/api/definition/components/environment/EnvironmentEdit.vue index c35c270df6..834708f56c 100644 --- a/frontend/src/business/components/api/definition/components/environment/EnvironmentEdit.vue +++ b/frontend/src/business/components/api/definition/components/environment/EnvironmentEdit.vue @@ -101,7 +101,7 @@ if (param.id) { url = '/api/environment/update'; } - this.result = this.$post(url, param, response => { + this.result = this.$fileUpload(url, null, [], param, response => { if (!param.id) { environment.id = response.data; } diff --git a/frontend/src/business/components/settings/project/EnvironmentImport.vue b/frontend/src/business/components/settings/project/EnvironmentImport.vue index ff60c7dd6c..8151ca4b84 100644 --- a/frontend/src/business/components/settings/project/EnvironmentImport.vue +++ b/frontend/src/business/components/settings/project/EnvironmentImport.vue @@ -93,7 +93,7 @@ export default { JSON.parse(fileString).map(env => { //projectId为空字符串要转换为null,空字符串会被认为有projectId env.projectId = this.currentProjectId === '' ? null : this.currentProjectId; - this.$post('/api/environment/add', env, response => { + this.$fileUpload('/api/environment/add', null,[], env, response => { this.$emit('refresh'); this.$success(this.$t('commons.save_success')); })