From ca1429c45edd7bea850f5d5a84da02d4bb370713 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Fri, 26 Aug 2022 11:57:47 +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=8D=E9=9D=9Ehttp=E7=9A=84=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E8=B7=B3=E8=BD=AC=E5=87=BA=E7=8E=B0=E7=9A=84?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E6=A0=91=E4=B8=8D=E6=98=AF=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E7=9A=84=E8=AF=B7=E6=B1=82=E7=B1=BB=E5=9E=8B=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=B8=AD=E7=9A=84=E6=A8=A1=E5=9D=97=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=B8=8D=E5=87=BA=E6=9D=A5=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=1016214 --user=宋天阳 【接口测试】首页-过去7天有更新的接口跳转链接页面显示模块信息为空。 https://www.tapd.cn/55049933/s/1234369 --- .../api/definition/ApiDefinition.vue | 34 +- .../components/complete/BasisApi.vue | 278 ++++++++-------- .../components/complete/TCPBasicApi.vue | 314 +++++++++--------- .../components/module/ApiModule.vue | 9 +- 4 files changed, 353 insertions(+), 282 deletions(-) diff --git a/frontend/src/business/components/api/definition/ApiDefinition.vue b/frontend/src/business/components/api/definition/ApiDefinition.vue index 7fd8b31554..75288d9376 100644 --- a/frontend/src/business/components/api/definition/ApiDefinition.vue +++ b/frontend/src/business/components/api/definition/ApiDefinition.vue @@ -4,6 +4,8 @@ @@ -284,6 +285,34 @@ export default { projectId() { return getCurrentProjectID(); }, + isSelectDefaultProtocol() { + let selectDefaultProtocol = true; + let routeParamObj = this.$route.params.paramObj; + if (routeParamObj) { + let dataRange = routeParamObj.dataSelectRange; + let dataType = routeParamObj.dataType; + if (dataRange && typeof dataRange === 'string') { + let selectParamArr = dataRange.split("edit:"); + if (selectParamArr.length === 2) { + if (dataType === 'api') { + selectDefaultProtocol = false; + } + } + } + } else { + let dataRange = this.$route.params.dataSelectRange; + let dataType = this.$route.params.dataType; + if (dataRange && typeof dataRange === 'string') { + let selectParamArr = dataRange.split("edit:"); + if (selectParamArr.length === 2) { + if (dataType === 'api') { + selectDefaultProtocol = false; + } + } + } + } + return selectDefaultProtocol; + }, }, components: { 'VersionSelect': VersionSelect.default, @@ -331,6 +360,7 @@ export default { selectNodeIds: [], currentApi: {}, moduleOptions: [], + defaultProtocol: null, trashEnable: false, apiTabs: [{ title: this.$t('api_test.definition.api_title'), @@ -765,6 +795,7 @@ export default { let scenarioId = selectParamArr[1]; if (dataType === 'api') { this.$get('/api/definition/get/' + scenarioId, (response) => { + this.defaultProtocol = response.data.protocol; this.editApi(response.data); }); } @@ -779,6 +810,7 @@ export default { let scenarioId = selectParamArr[1]; if (dataType === 'api') { this.$get('/api/definition/get/' + scenarioId, (response) => { + this.defaultProtocol = response.data.protocol; this.editApi(response.data); }); } diff --git a/frontend/src/business/components/api/definition/components/complete/BasisApi.vue b/frontend/src/business/components/api/definition/components/complete/BasisApi.vue index 1dbaae9b78..1c86d00fe6 100644 --- a/frontend/src/business/components/api/definition/components/complete/BasisApi.vue +++ b/frontend/src/business/components/api/definition/components/complete/BasisApi.vue @@ -1,6 +1,7 @@