From 83de4967f5bb85e9f5e10f734ec706499bd81073 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Thu, 23 Dec 2021 16:50:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BE=8B=E5=9C=A8=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E9=80=89no=20auth=20=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【接口用例在请求内容选no auth 报错】https://www.tapd.cn/33805590/bugtrace/bugs/view?bug_id=1133805590001008973 --- .../components/auth/ApiAuthConfig.vue | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/frontend/src/business/components/api/definition/components/auth/ApiAuthConfig.vue b/frontend/src/business/components/api/definition/components/auth/ApiAuthConfig.vue index 043a33e448..9c486be21b 100644 --- a/frontend/src/business/components/api/definition/components/auth/ApiAuthConfig.vue +++ b/frontend/src/business/components/api/definition/components/auth/ApiAuthConfig.vue @@ -99,18 +99,17 @@ export default { if (this.authConfig.username == undefined && this.authConfig.password == undefined) { this.authConfig = authManager; } + this.request.authManager = this.authConfig; } else { - if (this.request.hashTree) { - for (let index in this.request.hashTree) { - if (this.request.hashTree[index].type === "AuthManager") { - this.request.hashTree.splice(index, 1); - } - } + let authManager = createComponent("AuthManager"); + authManager.verification = "No Auth"; + if (this.request.hashTree == undefined) { + this.request.hashTree = []; } - this.request.authManager = {}; + this.request.hashTree.push(authManager); + this.authConfig = authManager; + this.request.authManager = this.authConfig; } - - this.request.authManager = this.authConfig; }, initData() { if (this.request.hashTree) {