fix(接口定义): 修复另存新接口路径不更新问题

This commit is contained in:
fit2-zhao 2021-03-24 18:51:24 +08:00
parent 637f0ea707
commit fca46fd9e7
3 changed files with 3 additions and 32 deletions

View File

@ -1,7 +1,7 @@
<template>
<el-form :model="request" :rules="rules" ref="request" label-width="100px" size="small" v-loading="loading"
:disabled="isReadOnly">
<el-button class="get-provider" type="primary" size="small" @click="getProviderList">Get Provider List</el-button>
<el-button class="get-provider" type="primary" size="mini" @click="getProviderList">Get Provider List</el-button>
<el-row>
<el-col :span="12">
<el-form-item label="Interfaces" prop="interfaces">

View File

@ -8,20 +8,10 @@
</el-tab-pane>
<el-tab-pane :label="$t('api_test.definition.request.response_header')" name="headers" class="pane">
<!--<div style="width: 400px">-->
<!--<pre>{{ response.responseResult.headers }}</pre>-->
<!--</div>-->
<ms-code-edit :mode="'text'" :read-only="true" :data.sync="response.responseResult.headers"/>
</el-tab-pane>
<!--<el-tab-pane label="Cookie" name="cookie" class="pane cookie">-->
<!--<pre>{{response.cookies}}</pre>-->
<!--</el-tab-pane>-->
<el-tab-pane :label="$t('api_test.definition.request.console')" name="console" class="pane">
<!--<div style="width: 400px">-->
<!--<pre>{{response.responseResult.console}}</pre>-->
<!--</div>-->
<ms-code-edit :mode="'text'" :read-only="true" :data.sync="response.responseResult.console"/>
</el-tab-pane>
@ -30,29 +20,10 @@
</el-tab-pane>
<el-tab-pane :label="$t('api_test.request.extract.label')" name="label" class="pane">
<!--<div style="width: 400px">-->
<!--<pre>{{response.responseResult.vars}}</pre>-->
<!--</div>-->
<ms-code-edit :mode="'text'" :read-only="true" :data.sync="response.responseResult.vars"/>
</el-tab-pane>
<el-tab-pane :label="$t('api_report.request_body')" name="request_body" class="pane">
<!--<div class="ms-div">-->
<!--{{$t('api_test.request.address')}} :-->
<!--<pre>{{ response.url }}</pre>-->
<!--</div>-->
<!--<div class="ms-div">-->
<!--{{$t('api_test.scenario.headers')}} :-->
<!--<pre>{{ response.headers }}</pre>-->
<!--</div>-->
<!--<div class="ms-div">-->
<!--Cookies :-->
<!--<pre>{{response.cookies}}</pre>-->
<!--</div>-->
<!--<div class="ms-div">-->
<!--Body :-->
<!--<pre>{{response.body ? response.body:""}}</pre>-->
<!--</div>-->
<ms-code-edit :mode="'text'" :read-only="true" :data.sync="reqMessages"/>
</el-tab-pane>

View File

@ -190,8 +190,8 @@ export default {
let req = this.api.request;
req.id = getUUID();
data.request = JSON.stringify(req);
data.method = this.api.method;
data.path = this.api.path;
data.method = req.method;
data.path = req.path;
data.url = this.api.url;
data.status = this.api.status;
data.userId = this.api.userId;