fix(接口测试): 历史遗留数据兼容,支持自动跳转测试页面
--bug=1018125 --user=赵勇 【接口测试】接口定义列表中执行某个接口不会跳转到TEST页面 https://www.tapd.cn/55049933/s/1262554
This commit is contained in:
parent
ef8550bac0
commit
3d2301327d
|
@ -855,7 +855,11 @@ export default {
|
||||||
if (Object.prototype.toString.call(row.response).match(/\[object (\w+)\]/)[1].toLowerCase() === 'object') {
|
if (Object.prototype.toString.call(row.response).match(/\[object (\w+)\]/)[1].toLowerCase() === 'object') {
|
||||||
response = row.response;
|
response = row.response;
|
||||||
} else {
|
} else {
|
||||||
|
try {
|
||||||
response = JSON.parse(row.response);
|
response = JSON.parse(row.response);
|
||||||
|
}catch (e){
|
||||||
|
response = {};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
response = {headers: [], body: new Body(), statusCode: [], type: "HTTP"};
|
response = {headers: [], body: new Body(), statusCode: [], type: "HTTP"};
|
||||||
|
|
Loading…
Reference in New Issue