From bf3ddfec21fbab332b3a2ac2e6882e8d6e1e033a Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 26 Mar 2024 18:26:53 +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=8Dbinary=E5=85=B3=E8=81=94=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=8C=E5=85=B3=E8=81=94=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1037627 --user=王孝刚 【接口测试】接口定义-用例-创建用例-请求体是binary 格式关联系统vue后缀文件,执行结果获取不到文件 https://www.tapd.cn/55049933/s/1481223 --- .../api-test/components/requestComposition/body.vue | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/frontend/src/views/api-test/components/requestComposition/body.vue b/frontend/src/views/api-test/components/requestComposition/body.vue index 59a41df8c4..0926c78213 100644 --- a/frontend/src/views/api-test/components/requestComposition/body.vue +++ b/frontend/src/views/api-test/components/requestComposition/body.vue @@ -155,14 +155,13 @@ }); async function handleFileChange(files: MsFileItem[], file?: MsFileItem) { - if (!props.uploadTempFileApi) return; - if (files.length === 0 && file === undefined) { - innerParams.value.binaryBody.file = undefined; - emit('change'); - return; - } try { - if (file?.local && file.file) { + if (file?.local && file.file && props.uploadTempFileApi) { + if (files.length === 0) { + innerParams.value.binaryBody.file = undefined; + emit('change'); + return; + } // 本地上传 appStore.showLoading(); const res = await props.uploadTempFileApi(file.file);