fix(接口测试): 修复报告中范例展示时预览数据出现数组格式的问题
--bug=1012866 --user=宋天阳 【接口测试】github#13138,分享出来的接口没有描述信息 json结构图多了个"0" https://www.tapd.cn/55049933/s/1151538
This commit is contained in:
parent
97dde4eead
commit
cdc7d0e35d
|
@ -397,7 +397,11 @@ public class ShareInfoService {
|
|||
}
|
||||
}
|
||||
if (!previewJsonArray.isEmpty()) {
|
||||
apiInfoDTO.setRequestPreviewData(previewJsonArray);
|
||||
if(previewJsonArray.size() == 1){
|
||||
apiInfoDTO.setRequestPreviewData(previewJsonArray.get(0));
|
||||
}else {
|
||||
apiInfoDTO.setRequestPreviewData(previewJsonArray);
|
||||
}
|
||||
}
|
||||
apiInfoDTO.setSelectedFlag(true);
|
||||
return apiInfoDTO;
|
||||
|
|
|
@ -1153,14 +1153,14 @@ export default {
|
|||
param.ids = [row.id];
|
||||
this.$post('/api/automation/checkBeforeDelete/', param, response => {
|
||||
let checkResult = response.data;
|
||||
let alertMsg = this.$t('load_test.delete_threadgroup_confirm') + " [" + row.name + "] ?";
|
||||
let alertMsg = this.$t('load_test.delete_threadgroup_confirm') + " " + row.name + " ?";
|
||||
if (!checkResult.deleteFlag) {
|
||||
alertMsg = "";
|
||||
checkResult.checkMsg.forEach(item => {
|
||||
alertMsg += item;
|
||||
});
|
||||
if (alertMsg === "") {
|
||||
alertMsg = this.$t('load_test.delete_threadgroup_confirm') + " [" + row.name + "] ?";
|
||||
alertMsg = this.$t('load_test.delete_threadgroup_confirm') + " " + row.name + " ?";
|
||||
} else {
|
||||
alertMsg += this.$t('api_test.is_continue');
|
||||
}
|
||||
|
|
|
@ -138,20 +138,6 @@ export default {
|
|||
},
|
||||
//构建预览数据
|
||||
genPreviewData(previewData) {
|
||||
if (previewData !== null && previewData !== '') {
|
||||
let showDataObj = {};
|
||||
for (var key in previewData) {
|
||||
let value = previewData[key];
|
||||
if (typeof (value) == 'string') {
|
||||
if (value.indexOf("@") >= 0) {
|
||||
value = this.showPreview(value);
|
||||
}
|
||||
}
|
||||
showDataObj[key] = value;
|
||||
}
|
||||
showDataObj = JSON.stringify(showDataObj);
|
||||
previewData = formatJson(showDataObj);
|
||||
}
|
||||
return previewData;
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue