From b2f307ce4ae897d8aaaf161d1c0f66fa56f778a3 Mon Sep 17 00:00:00 2001
From: wxg0103 <727495428@qq.com>
Date: Mon, 20 Dec 2021 14:06:19 +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 | 34 +++++++++++--------
1 file changed, 19 insertions(+), 15 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 e6dbec11b4..043a33e448 100644
--- a/frontend/src/business/components/api/definition/components/auth/ApiAuthConfig.vue
+++ b/frontend/src/business/components/api/definition/components/auth/ApiAuthConfig.vue
@@ -8,10 +8,10 @@
+ v-for="item in options"
+ :key="item.name"
+ :label="item.name"
+ :value="item.name">
@@ -24,7 +24,8 @@
-
+
@@ -42,10 +43,10 @@
+ v-for="item in encryptOptions"
+ :key="item.id"
+ :label="item.name"
+ :value="item.id">
@@ -90,25 +91,28 @@ export default {
let authManager = createComponent("AuthManager");
authManager.verification = "Basic Auth";
authManager.environment = this.request.useEnvironment;
- if(this.request.hashTree == undefined){
+ if (this.request.hashTree == undefined) {
this.request.hashTree = [];
}
this.request.hashTree.push(authManager);
// 这里做个判断,如果原来有值则不覆盖
- if(this.authConfig.username == undefined && this.authConfig.password == undefined){
+ if (this.authConfig.username == undefined && this.authConfig.password == undefined) {
this.authConfig = authManager;
}
} else {
- for (let index in this.request.hashTree) {
- if (this.request.hashTree[index].type === "AuthManager") {
- this.request.hashTree.splice(index, 1);
+ if (this.request.hashTree) {
+ for (let index in this.request.hashTree) {
+ if (this.request.hashTree[index].type === "AuthManager") {
+ this.request.hashTree.splice(index, 1);
+ }
}
}
this.request.authManager = {};
}
+
this.request.authManager = this.authConfig;
},
- initData(){
+ initData() {
if (this.request.hashTree) {
for (let index in this.request.hashTree) {
if (this.request.hashTree[index].type == 'AuthManager') {