fix: idea插件导入接口定义导致body切换失效
This commit is contained in:
parent
b032ec0313
commit
f89be086c4
|
@ -119,6 +119,7 @@ import ApiCaseSimpleList from "./list/ApiCaseSimpleList";
|
|||
import MsApiCaseList from "./case/ApiCaseList";
|
||||
import {getUUID} from "@/common/js/utils";
|
||||
import {TYPE_TO_C} from "@/business/components/api/automation/scenario/Setting";
|
||||
import _ from 'lodash';
|
||||
|
||||
export default {
|
||||
name: "EditCompleteContainer",
|
||||
|
@ -218,6 +219,11 @@ export default {
|
|||
if (this.currentApi.request != null && this.currentApi.request != 'null' && this.currentApi.request != undefined) {
|
||||
if (Object.prototype.toString.call(this.currentApi.request).match(/\[object (\w+)\]/)[1].toLowerCase() !== 'object') {
|
||||
this.currentApi.request = JSON.parse(this.currentApi.request);
|
||||
if (!this.currentApi.request.body.type) {
|
||||
let tempRequest = _.cloneDeep(this.currentApi.request);
|
||||
tempRequest.body = {type: null};
|
||||
this.currentApi.request = tempRequest;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.currentApi && this.currentApi.request && !this.currentApi.request.hashTree) {
|
||||
|
|
Loading…
Reference in New Issue