diff --git a/frontend/src/views/api-test/components/requestComposition/response/index.vue b/frontend/src/views/api-test/components/requestComposition/response/index.vue index 710871e46c..8d20760f3b 100644 --- a/frontend/src/views/api-test/components/requestComposition/response/index.vue +++ b/frontend/src/views/api-test/components/requestComposition/response/index.vue @@ -58,65 +58,7 @@ -
- -
- {{ props.requestResult.responseResult.responseCode }} -
- -
- -
{{ timingInfo?.responseTime }} ms
- -
- -
- {{ props.requestResult.responseResult.responseSize }} bytes -
- -
- -
+ ('responseDefinition', { default: [], }); - // 响应时间信息 - const timingInfo = computed(() => { - if (props.requestResult) { - const { - dnsLookupTime, - downloadTime, - latency, - responseTime, - socketInitTime, - sslHandshakeTime, - tcpHandshakeTime, - transferStartTime, - } = props.requestResult.responseResult; - return { - dnsLookupTime, - tcpHandshakeTime, - sslHandshakeTime, - socketInitTime, - latency, - downloadTime, - transferStartTime, - responseTime, - }; - } - return null; - }); - // 响应状态码对应颜色 - const statusCodeColor = computed(() => { - if (props.requestResult) { - const code = props.requestResult.responseResult.responseCode; - if (code >= 200 && code < 300) { - return 'rgb(var(--success-7)'; - } - if (code >= 300 && code < 400) { - return 'rgb(var(--warning-7)'; - } - return 'rgb(var(--danger-7)'; - } - return ''; - }); watchEffect(() => { // 过滤无效数据后的有效响应数据;当接口导入时会存在部分字段为 null 的数据,需要设置默认值 let hasInvalid = false; @@ -312,18 +214,6 @@ ); - - diff --git a/frontend/src/views/api-test/management/components/management/api/preview/detail.vue b/frontend/src/views/api-test/management/components/management/api/preview/detail.vue index cf0fc15597..d5f95ca541 100644 --- a/frontend/src/views/api-test/management/components/management/api/preview/detail.vue +++ b/frontend/src/views/api-test/management/components/management/api/preview/detail.vue @@ -244,14 +244,17 @@ key="response" >