fix(接口测试): 解决执行接口定义console报错
--user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001017109
This commit is contained in:
parent
eb809192e3
commit
1347f6786e
|
@ -785,7 +785,13 @@ export default {
|
||||||
this.$emit('copyApi', obj);
|
this.$emit('copyApi', obj);
|
||||||
},
|
},
|
||||||
runApi(row) {
|
runApi(row) {
|
||||||
let request = row ? JSON.parse(row.request) : {};
|
let request;
|
||||||
|
if (typeof (row.request) === 'string') {
|
||||||
|
request = row ? JSON.parse(row.request) : {};
|
||||||
|
} else {
|
||||||
|
request = row ? row.request : {};
|
||||||
|
}
|
||||||
|
|
||||||
if (row.tags instanceof Array) {
|
if (row.tags instanceof Array) {
|
||||||
row.tags = JSON.stringify(row.tags);
|
row.tags = JSON.stringify(row.tags);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue