diff --git a/api-test/frontend/src/business/automation/scenario/variable/VariableList.vue b/api-test/frontend/src/business/automation/scenario/variable/VariableList.vue index 8f52f08c7e..2cc0bfd4a6 100644 --- a/api-test/frontend/src/business/automation/scenario/variable/VariableList.vue +++ b/api-test/frontend/src/business/automation/scenario/variable/VariableList.vue @@ -336,7 +336,7 @@ export default { params.forEach((item) => { if (item) { let line = item.split(/:|:/); - let values = item.substr(line[0].length + 1); + let values = item.substr(line[0].length + 1).trim(); let required = false; keyValues.push( new KeyValue({ diff --git a/api-test/frontend/src/business/definition/components/basis/BatchAddParameterButton.vue b/api-test/frontend/src/business/definition/components/basis/BatchAddParameterButton.vue index 89597802bf..debc0094db 100644 --- a/api-test/frontend/src/business/definition/components/basis/BatchAddParameterButton.vue +++ b/api-test/frontend/src/business/definition/components/basis/BatchAddParameterButton.vue @@ -19,7 +19,7 @@ export default { let keyValues = []; params.forEach((item) => { let line = item.split(/:|:/); - let values = item.substr(line[0].length + 1); + let values = item.substr(line[0].length + 1).trim(); let required = false; if (line[1] === '必填' || line[1] === 'Required' || line[1] === 'true') { required = true; diff --git a/api-test/frontend/src/business/definition/components/body/ApiBody.vue b/api-test/frontend/src/business/definition/components/body/ApiBody.vue index 87acc277a6..baceb42f6b 100644 --- a/api-test/frontend/src/business/definition/components/body/ApiBody.vue +++ b/api-test/frontend/src/business/definition/components/body/ApiBody.vue @@ -355,8 +355,8 @@ export default { params.forEach((item) => { if (item) { let line = []; - line[0] = item.substring(0, item.indexOf(':')); - line[1] = item.substring(item.indexOf(':') + 1, item.length); + line[0] = item.substring(0, item.indexOf(/:|:/)).trim(); + line[1] = item.substring(item.indexOf(/:|:/) + 1, item.length).trim(); let required = false; keyValues.push( new KeyValue({ diff --git a/api-test/frontend/src/business/definition/components/request/http/ApiHttpRequestForm.vue b/api-test/frontend/src/business/definition/components/request/http/ApiHttpRequestForm.vue index c6e578ee92..28d63d949e 100644 --- a/api-test/frontend/src/business/definition/components/request/http/ApiHttpRequestForm.vue +++ b/api-test/frontend/src/business/definition/components/request/http/ApiHttpRequestForm.vue @@ -512,7 +512,7 @@ export default { params.forEach((item) => { if (item) { let line = item.split(/:|:/); - let values = item.substr(line[0].length +1); + let values = item.substr(line[0].length +1).trim(); let required = false; keyValues.push( diff --git a/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue b/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue index f983c5fcf0..8adacbd689 100644 --- a/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue +++ b/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue @@ -477,7 +477,7 @@ export default { params.forEach(item => { if (item) { let line = item.split(/:|:/); - let values = item.substr(line[0].length + 1); + let values = item.substr(line[0].length + 1).trim(); let required = false; keyValues.push(new KeyValue({ name: line[0], diff --git a/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue b/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue index b4c205de28..75be75ffd1 100644 --- a/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue +++ b/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue @@ -436,7 +436,7 @@ export default { params.forEach((item) => { if (item) { let line = item.split(/:|:/); - let values = item.substr(line[0].length + 1); + let values = item.substr(line[0].length + 1).trim(); let required = false; keyValues.push( new KeyValue({ diff --git a/project-management/frontend/src/business/menu/environment/components/EnvironmentHttpConfig.vue b/project-management/frontend/src/business/menu/environment/components/EnvironmentHttpConfig.vue index 8ce0b24331..464bf407f6 100644 --- a/project-management/frontend/src/business/menu/environment/components/EnvironmentHttpConfig.vue +++ b/project-management/frontend/src/business/menu/environment/components/EnvironmentHttpConfig.vue @@ -485,12 +485,12 @@ export default { params.forEach(item => { if (item) { let line = item.split(/:|:/); - let values = item.split(line[0] + ":"); + let values = item.substr(line[0].length +1).trim(); let required = false; keyValues.push(new KeyValue({ name: line[0], required: required, - value: values[1], + value: values, type: "text", valid: false, file: false, diff --git a/test-track/frontend/src/business/plan/view/comonents/report/detail/api/ApiBody.vue b/test-track/frontend/src/business/plan/view/comonents/report/detail/api/ApiBody.vue index 19f4d362c5..ee8cd5e100 100644 --- a/test-track/frontend/src/business/plan/view/comonents/report/detail/api/ApiBody.vue +++ b/test-track/frontend/src/business/plan/view/comonents/report/detail/api/ApiBody.vue @@ -270,8 +270,8 @@ export default { params.forEach(item => { if (item) { let line = []; - line[0] = item.substring(0, item.indexOf(":")); - line[1] = item.substring(item.indexOf(":") + 1, item.length); + line[0] = item.substring(0, item.indexOf(":")).trim(); + line[1] = item.substring(item.indexOf(":") + 1, item.length).trim(); let required = false; keyValues.push(new KeyValue({ name: line[0], diff --git a/workstation/frontend/src/business/module/environment/EnvironmentHttpConfig.vue b/workstation/frontend/src/business/module/environment/EnvironmentHttpConfig.vue index 567f6135ac..7712c95a83 100644 --- a/workstation/frontend/src/business/module/environment/EnvironmentHttpConfig.vue +++ b/workstation/frontend/src/business/module/environment/EnvironmentHttpConfig.vue @@ -453,12 +453,12 @@ export default { params.forEach(item => { if (item) { let line = item.split(/:|:/); - let values = item.split(line[0] + ":"); + let values = item.substr(line[0].length +1).trim(); let required = false; keyValues.push(new KeyValue({ name: line[0], required: required, - value: values[1], + value: values, type: "text", valid: false, file: false,