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 d8a884d42c..686f340435 100644 --- a/api-test/frontend/src/business/automation/scenario/variable/VariableList.vue +++ b/api-test/frontend/src/business/automation/scenario/variable/VariableList.vue @@ -336,13 +336,13 @@ 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); let required = false; keyValues.push( new KeyValue({ name: line[0], required: required, - value: values[1], + value: values, type: 'CONSTANT', valid: false, file: false, 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 4d87363d09..469633325b 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.split(line[0] + ':'); + let values = item.substr(line[0].length + 1); let required = false; if (line[1] === '必填' || line[1] === 'Required' || line[1] === 'true') { required = true; @@ -28,8 +28,7 @@ export default { new KeyValue({ name: line[0], required: required, - value: values[1], - description: line[3], + value: values, type: 'text', valid: false, file: false, 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 81d04de8c6..991aa5cf09 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,14 +512,14 @@ 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); 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/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue b/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue index 76dd55e43d..130e6c6f36 100644 --- a/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue +++ b/framework/sdk-parent/frontend/src/components/environment/EnvironmentHttpConfig.vue @@ -474,12 +474,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); 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/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue b/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue index 7c822a2aa5..17cc7ee859 100644 --- a/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue +++ b/framework/sdk-parent/frontend/src/components/environment/commons/ApiScenarioVariables.vue @@ -403,13 +403,13 @@ 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); let required = false; keyValues.push( new KeyValue({ name: line[0], required: required, - value: values[1], + value: values, type: "CONSTANT", valid: false, file: false,