fix(接口测试): 修复场景步骤中含有302内容数据时无法远程异步加载步骤内容的问题

修复场景步骤中含有302内容数据时无法远程异步加载步骤内容的问题
This commit is contained in:
song-tianyang 2022-05-27 17:20:16 +08:00 committed by fit2-zhao
parent ec540937c1
commit 5b8b8d82a8
1 changed files with 4 additions and 9 deletions

View File

@ -234,21 +234,16 @@ export default {
}, },
methods: { methods: {
loadRequestInfoExpand() { loadRequestInfoExpand() {
if( !this.request.responseResult || (!this.request.responseResult.body && this.request.responseResult.body === null)){ if (!this.request.responseResult || this.request.responseResult.body === null || this.request.responseResult.body === undefined) {
this.$get("/api/scenario/report/selectReportContent/" + this.stepId, response => { this.$get("/api/scenario/report/selectReportContent/" + this.stepId, response => {
let requestResult = response.data; this.requestInfo = response.data;
if (requestResult) {
this.requestInfo = requestResult;
}
this.$nextTick(() => { this.$nextTick(() => {
this.requestInfo.loading = false; this.requestInfo.loading = false;
}); });
}); });
} else { } else {
if (this.request.responseResult && (this.request.responseResult.body || this.request.responseResult.body === '')) {
this.requestInfo = this.request; this.requestInfo = this.request;
} }
}
}, },
active() { active() {
if (this.request.unexecute) { if (this.request.unexecute) {