From 82bafb651eba3207359470a8d92782341cb55673 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Thu, 13 Oct 2022 15:27:45 +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=8Dmock=E9=9D=A2=E6=9D=BF=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E4=BD=93=E5=8F=98=E9=87=8F=E6=B2=A1=E5=8F=8D?= =?UTF-8?q?=E5=BA=94=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1017952 --user=宋天阳 【接口测试】mock - 后置脚本,点击 “请求体变量” 模板没有反应 https://www.tapd.cn/55049933/s/1260581 --- .../src/business/automation/scenario/testplan/TestPlanList.vue | 3 +-- .../components/mock/Components/MockApiScriptEditor.vue | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api-test/frontend/src/business/automation/scenario/testplan/TestPlanList.vue b/api-test/frontend/src/business/automation/scenario/testplan/TestPlanList.vue index 62fb8590a4..f99ca2b3ee 100644 --- a/api-test/frontend/src/business/automation/scenario/testplan/TestPlanList.vue +++ b/api-test/frontend/src/business/automation/scenario/testplan/TestPlanList.vue @@ -4,8 +4,7 @@ diff --git a/api-test/frontend/src/business/definition/components/mock/Components/MockApiScriptEditor.vue b/api-test/frontend/src/business/definition/components/mock/Components/MockApiScriptEditor.vue index fa305b1d53..430d43c8ce 100644 --- a/api-test/frontend/src/business/definition/components/mock/Components/MockApiScriptEditor.vue +++ b/api-test/frontend/src/business/definition/components/mock/Components/MockApiScriptEditor.vue @@ -194,6 +194,8 @@ export default { case "body": if (laguanges === "python") { returnScript = 'param=vars["body.${param}"]'; + } else { + returnScript = 'var param=vars.get("body.${param}")'; } break; case "bodyRaw":