From 93f31c8e5feda8e9f00396de90f7e2214d6bb3ac Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 3 Apr 2023 18:43:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8Djson=E8=AF=B7=E6=B1=82=E4=BD=93=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E6=9B=BF=E6=8D=A2=E5=90=8E=EF=BC=8C=E6=97=A7=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=E4=BE=9D=E7=84=B6=E5=9C=A8=EF=BC=8C=E4=B8=94=E6=96=B0?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E8=BE=93=E5=85=A5=E4=B8=8D=E4=BA=86=E7=9A=84?= =?UTF-8?q?=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1025048 --user=王孝刚 【接口测试】github#23336,接口 json 请求体内容替换后,旧描述依然在,且新描述输入不了 https://www.tapd.cn/55049933/s/1358884 --- .../src/business/definition/components/body/ApiBody.vue | 2 +- .../definition/components/complete/EditCompleteHTTPApi.vue | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api-test/frontend/src/business/definition/components/body/ApiBody.vue b/api-test/frontend/src/business/definition/components/body/ApiBody.vue index c1a583d441..87acc277a6 100644 --- a/api-test/frontend/src/business/definition/components/body/ApiBody.vue +++ b/api-test/frontend/src/business/definition/components/body/ApiBody.vue @@ -263,7 +263,7 @@ export default { if (!this.body.jsonSchema.type) { this.body.jsonSchema.type = data.type; } - this.body.jsonSchema = this.deepAssign(this.body.jsonSchema, data); + this.body.jsonSchema = JSON.parse(JSON.stringify(this.deepAssign(this.body.jsonSchema, data))); } } catch (e) { this.body.format = 'JSON'; diff --git a/api-test/frontend/src/business/definition/components/complete/EditCompleteHTTPApi.vue b/api-test/frontend/src/business/definition/components/complete/EditCompleteHTTPApi.vue index f3e9e6fbe8..2c227cfaa9 100644 --- a/api-test/frontend/src/business/definition/components/complete/EditCompleteHTTPApi.vue +++ b/api-test/frontend/src/business/definition/components/complete/EditCompleteHTTPApi.vue @@ -1146,7 +1146,9 @@ export default { if (!this.basisData.environmentId) { this.basisData.environmentId = ''; } - if (this.basisData.moduleId && this.basisData.moduleId === 'default-module') { + if (this.basisData.moduleId && + this.basisData.moduleId === 'default-module' && + this.moduleOptions) { this.basisData.moduleId = this.moduleOptions[0].id; } if (this.basisData.isCopy) {