refactor(接口测试): 接口测试批量添加请求参数时自动去空格
--story=1011681 --user=王孝刚 接口测试批量添加请求参数时自动去空格 https://www.tapd.cn/55049933/s/1359910
This commit is contained in:
parent
81412c768a
commit
912649a48d
|
@ -336,7 +336,7 @@ export default {
|
||||||
params.forEach((item) => {
|
params.forEach((item) => {
|
||||||
if (item) {
|
if (item) {
|
||||||
let line = item.split(/:|:/);
|
let line = item.split(/:|:/);
|
||||||
let values = item.substr(line[0].length + 1);
|
let values = item.substr(line[0].length + 1).trim();
|
||||||
let required = false;
|
let required = false;
|
||||||
keyValues.push(
|
keyValues.push(
|
||||||
new KeyValue({
|
new KeyValue({
|
||||||
|
|
|
@ -19,7 +19,7 @@ export default {
|
||||||
let keyValues = [];
|
let keyValues = [];
|
||||||
params.forEach((item) => {
|
params.forEach((item) => {
|
||||||
let line = item.split(/:|:/);
|
let line = item.split(/:|:/);
|
||||||
let values = item.substr(line[0].length + 1);
|
let values = item.substr(line[0].length + 1).trim();
|
||||||
let required = false;
|
let required = false;
|
||||||
if (line[1] === '必填' || line[1] === 'Required' || line[1] === 'true') {
|
if (line[1] === '必填' || line[1] === 'Required' || line[1] === 'true') {
|
||||||
required = true;
|
required = true;
|
||||||
|
|
|
@ -355,8 +355,8 @@ export default {
|
||||||
params.forEach((item) => {
|
params.forEach((item) => {
|
||||||
if (item) {
|
if (item) {
|
||||||
let line = [];
|
let line = [];
|
||||||
line[0] = item.substring(0, item.indexOf(':'));
|
line[0] = item.substring(0, item.indexOf(/:|:/)).trim();
|
||||||
line[1] = item.substring(item.indexOf(':') + 1, item.length);
|
line[1] = item.substring(item.indexOf(/:|:/) + 1, item.length).trim();
|
||||||
let required = false;
|
let required = false;
|
||||||
keyValues.push(
|
keyValues.push(
|
||||||
new KeyValue({
|
new KeyValue({
|
||||||
|
|
|
@ -512,7 +512,7 @@ export default {
|
||||||
params.forEach((item) => {
|
params.forEach((item) => {
|
||||||
if (item) {
|
if (item) {
|
||||||
let line = item.split(/:|:/);
|
let line = item.split(/:|:/);
|
||||||
let values = item.substr(line[0].length +1);
|
let values = item.substr(line[0].length +1).trim();
|
||||||
|
|
||||||
let required = false;
|
let required = false;
|
||||||
keyValues.push(
|
keyValues.push(
|
||||||
|
|
|
@ -477,7 +477,7 @@ export default {
|
||||||
params.forEach(item => {
|
params.forEach(item => {
|
||||||
if (item) {
|
if (item) {
|
||||||
let line = item.split(/:|:/);
|
let line = item.split(/:|:/);
|
||||||
let values = item.substr(line[0].length + 1);
|
let values = item.substr(line[0].length + 1).trim();
|
||||||
let required = false;
|
let required = false;
|
||||||
keyValues.push(new KeyValue({
|
keyValues.push(new KeyValue({
|
||||||
name: line[0],
|
name: line[0],
|
||||||
|
|
|
@ -436,7 +436,7 @@ export default {
|
||||||
params.forEach((item) => {
|
params.forEach((item) => {
|
||||||
if (item) {
|
if (item) {
|
||||||
let line = item.split(/:|:/);
|
let line = item.split(/:|:/);
|
||||||
let values = item.substr(line[0].length + 1);
|
let values = item.substr(line[0].length + 1).trim();
|
||||||
let required = false;
|
let required = false;
|
||||||
keyValues.push(
|
keyValues.push(
|
||||||
new KeyValue({
|
new KeyValue({
|
||||||
|
|
|
@ -485,12 +485,12 @@ export default {
|
||||||
params.forEach(item => {
|
params.forEach(item => {
|
||||||
if (item) {
|
if (item) {
|
||||||
let line = item.split(/:|:/);
|
let line = item.split(/:|:/);
|
||||||
let values = item.split(line[0] + ":");
|
let values = item.substr(line[0].length +1).trim();
|
||||||
let required = false;
|
let required = false;
|
||||||
keyValues.push(new KeyValue({
|
keyValues.push(new KeyValue({
|
||||||
name: line[0],
|
name: line[0],
|
||||||
required: required,
|
required: required,
|
||||||
value: values[1],
|
value: values,
|
||||||
type: "text",
|
type: "text",
|
||||||
valid: false,
|
valid: false,
|
||||||
file: false,
|
file: false,
|
||||||
|
|
|
@ -270,8 +270,8 @@ export default {
|
||||||
params.forEach(item => {
|
params.forEach(item => {
|
||||||
if (item) {
|
if (item) {
|
||||||
let line = [];
|
let line = [];
|
||||||
line[0] = item.substring(0, item.indexOf(":"));
|
line[0] = item.substring(0, item.indexOf(":")).trim();
|
||||||
line[1] = item.substring(item.indexOf(":") + 1, item.length);
|
line[1] = item.substring(item.indexOf(":") + 1, item.length).trim();
|
||||||
let required = false;
|
let required = false;
|
||||||
keyValues.push(new KeyValue({
|
keyValues.push(new KeyValue({
|
||||||
name: line[0],
|
name: line[0],
|
||||||
|
|
|
@ -453,12 +453,12 @@ export default {
|
||||||
params.forEach(item => {
|
params.forEach(item => {
|
||||||
if (item) {
|
if (item) {
|
||||||
let line = item.split(/:|:/);
|
let line = item.split(/:|:/);
|
||||||
let values = item.split(line[0] + ":");
|
let values = item.substr(line[0].length +1).trim();
|
||||||
let required = false;
|
let required = false;
|
||||||
keyValues.push(new KeyValue({
|
keyValues.push(new KeyValue({
|
||||||
name: line[0],
|
name: line[0],
|
||||||
required: required,
|
required: required,
|
||||||
value: values[1],
|
value: values,
|
||||||
type: "text",
|
type: "text",
|
||||||
valid: false,
|
valid: false,
|
||||||
file: false,
|
file: false,
|
||||||
|
|
Loading…
Reference in New Issue