fix(系统设置): 修复环境配置批量添加请求头f12复制的接口请求数据host、Origin、Referer对应key数据缺失的缺陷
--bug=1011432 --user=王孝刚 【环境配置】http配置-批量添加请求头(f12复制的接口请求数据)-host、Origin、Referer对应key数据缺失 https://www.tapd.cn/55049933/s/1148298
This commit is contained in:
parent
9664a5765a
commit
77ca0e4002
|
@ -18,12 +18,24 @@
|
|||
let params = data.split("\n");
|
||||
let keyValues = [];
|
||||
params.forEach(item => {
|
||||
let line = item.split(/,|,/);
|
||||
let line = item.split(/:|:/);
|
||||
let values = item.split(line[0] + ":");
|
||||
let required = false;
|
||||
if (line[1] === '必填' || line[1] === 'Required' || line[1] === 'true') {
|
||||
required = true;
|
||||
}
|
||||
keyValues.push(new KeyValue({name: line[0], required: required, value: line[2], description: line[3], type: "text", valid: false, file: false, encode: true, enable: true, contentType: "text/plain"}));
|
||||
keyValues.push(new KeyValue({
|
||||
name: line[0],
|
||||
required: required,
|
||||
value: values[1],
|
||||
description: line[3],
|
||||
type: "text",
|
||||
valid: false,
|
||||
file: false,
|
||||
encode: true,
|
||||
enable: true,
|
||||
contentType: "text/plain"
|
||||
}));
|
||||
})
|
||||
keyValues.forEach(item => {
|
||||
this.data.unshift(item);
|
||||
|
|
|
@ -430,12 +430,12 @@ export default {
|
|||
let keyValues = [];
|
||||
params.forEach(item => {
|
||||
let line = item.split(/:|:/);
|
||||
let values = item.split(line[0] + ":");
|
||||
let required = false;
|
||||
keyValues.unshift(new KeyValue({
|
||||
name: line[0],
|
||||
required: required,
|
||||
value: line[1],
|
||||
description: line[2],
|
||||
value: values[1],
|
||||
type: "text",
|
||||
valid: false,
|
||||
file: false,
|
||||
|
|
|
@ -110,12 +110,12 @@ export default {
|
|||
let keyValues = [];
|
||||
params.forEach(item => {
|
||||
let line = item.split(/:|:/);
|
||||
let values = item.split(line[0] + ":");
|
||||
let required = false;
|
||||
keyValues.unshift(new KeyValue({
|
||||
name: line[0],
|
||||
required: required,
|
||||
value: line[1],
|
||||
description: line[2],
|
||||
value: values[1],
|
||||
type: "text",
|
||||
valid: false,
|
||||
file: false,
|
||||
|
|
Loading…
Reference in New Issue