mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-05 05:29:29 +08:00
Merge branch 'master' of https://github.com/metersphere/metersphere
This commit is contained in:
commit
556ddddd84
@ -80,6 +80,18 @@
|
||||
if (!this.request.hashTree) {
|
||||
this.request.hashTree = [];
|
||||
}
|
||||
// 处理导入数据缺失问题
|
||||
if (this.response.body) {
|
||||
let body = new Body();
|
||||
Object.assign(body, this.response.body);
|
||||
if (!body.binary) {
|
||||
body.binary = [];
|
||||
}
|
||||
if (!body.kvs) {
|
||||
body.kvs = [];
|
||||
}
|
||||
this.response.body = body;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
runTest(data) {
|
||||
|
@ -64,9 +64,9 @@
|
||||
</el-col>
|
||||
|
||||
<!--<el-col v-if="type === 'body'" class="kv-select">-->
|
||||
<!--<el-input :disabled="isReadOnly" v-model="item.contentType" size="small"-->
|
||||
<!--@change="change" :placeholder="$t('api_test.request.content_type')" show-word-limit>-->
|
||||
<!--</el-input>-->
|
||||
<!--<el-input :disabled="isReadOnly" v-model="item.contentType" size="small"-->
|
||||
<!--@change="change" :placeholder="$t('api_test.request.content_type')" show-word-limit>-->
|
||||
<!--</el-input>-->
|
||||
<!--</el-col>-->
|
||||
|
||||
<el-col class="kv-delete">
|
||||
|
@ -94,7 +94,7 @@
|
||||
saveApi(saveAs) {
|
||||
this.$refs['httpForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if(this.httpForm.path.match(/\s/)!=null){
|
||||
if (this.httpForm.path && this.httpForm.path.match(/\s/) != null) {
|
||||
this.$error(this.$t("api_test.definition.request.path_valid_info"));
|
||||
return false;
|
||||
}
|
||||
|
@ -182,11 +182,13 @@
|
||||
if (!this.body.type) {
|
||||
this.body.type = BODY_TYPE.FORM_DATA;
|
||||
}
|
||||
this.body.kvs.forEach(param => {
|
||||
if (!param.type) {
|
||||
param.type = 'text';
|
||||
}
|
||||
});
|
||||
if (this.body.kvs) {
|
||||
this.body.kvs.forEach(param => {
|
||||
if (!param.type) {
|
||||
param.type = 'text';
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<ms-api-key-value :isShowEnable="false" :suggestions="headerSuggestions" :items="response.headers"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('api_test.definition.request.response_body')" name="body" class="pane">
|
||||
<ms-api-body :isShowEnable="false" :body="response.body" :headers="response.headers"/>
|
||||
<ms-api-body :isReadOnly="false" :isShowEnable="false" :body="response.body" :headers="response.headers"/>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane :label="$t('api_test.definition.request.status_code')" name="status_code" class="pane">
|
||||
|
@ -18,7 +18,7 @@ export const DEFAULT_DATA = [{
|
||||
"name": "回收站",
|
||||
"level": 1,
|
||||
"children": [],
|
||||
},{
|
||||
}, {
|
||||
"id": "root",
|
||||
"name": "全部模块",
|
||||
"level": 0,
|
||||
@ -27,7 +27,13 @@ export const DEFAULT_DATA = [{
|
||||
|
||||
export const REQ_METHOD = [
|
||||
{id: 'GET', label: 'GET'},
|
||||
{id: 'POST', label: 'POST'}
|
||||
{id: 'POST', label: 'POST'},
|
||||
{id: 'PUT', label: 'PUT'},
|
||||
{id: 'PATCH', label: 'PATCH'},
|
||||
{id: 'DELETE', label: 'DELETE'},
|
||||
{id: 'OPTIONS', label: 'OPTIONS'},
|
||||
{id: 'HEAD', label: 'HEAD'},
|
||||
{id: 'CONNECT', label: 'CONNECT'}
|
||||
]
|
||||
|
||||
export const CASE_PRIORITY = [
|
||||
|
Loading…
Reference in New Issue
Block a user