diff --git a/frontend/src/business/components/api/definition/components/EditCompleteContainer.vue b/frontend/src/business/components/api/definition/components/EditCompleteContainer.vue index bfacaeedb6..67432a38a5 100644 --- a/frontend/src/business/components/api/definition/components/EditCompleteContainer.vue +++ b/frontend/src/business/components/api/definition/components/EditCompleteContainer.vue @@ -81,7 +81,7 @@
-
diff --git a/frontend/src/business/components/api/definition/components/mock/Components/MockApiResponseBody.vue b/frontend/src/business/components/api/definition/components/mock/Components/MockApiResponseBody.vue index ec0bf7cd58..1360edaf0c 100644 --- a/frontend/src/business/components/api/definition/components/mock/Components/MockApiResponseBody.vue +++ b/frontend/src/business/components/api/definition/components/mock/Components/MockApiResponseBody.vue @@ -61,6 +61,7 @@ :read-only="isReadOnly" :data.sync="body.raw" :modes="modes" + v-if="loadIsOver" height="90%" ref="codeEdit"/>
@@ -257,7 +258,7 @@ export default { let selectUrl = "/mockConfig/getApiResponse/" + this.apiId; this.$get(selectUrl, response => { let apiResponse = response.data; - if (apiResponse && apiResponse.returnMsg) { + if (apiResponse && apiResponse.returnData) { this.body.apiRspRaw = apiResponse.returnData; } this.refreshMsCodeEdit(); diff --git a/frontend/src/business/components/api/definition/components/mock/Components/MockApiScriptEditor.vue b/frontend/src/business/components/api/definition/components/mock/Components/MockApiScriptEditor.vue index a380dbdf14..f1ac3e428e 100644 --- a/frontend/src/business/components/api/definition/components/mock/Components/MockApiScriptEditor.vue +++ b/frontend/src/business/components/api/definition/components/mock/Components/MockApiScriptEditor.vue @@ -179,7 +179,7 @@ export default { if (laguanges === "python") { returnScript = 'param=vars["body.${param}"]'; } else { - returnScript = 'var param=vars.get(body.${param}")\n' + + returnScript = 'var param=vars.get(body.${param}");\n' + '//如果对象是多层JSON,需要引入fastjson协助解析:\n' + '// 以"{\"name\":\"user\",\"rows\":[{\"type\":1}]}" 为demo,取rows第1个的type数据:\n' + 'import com.alibaba.fastjson.JSON;\n' + diff --git a/frontend/src/business/components/api/definition/components/mock/Components/MockResponseParam.vue b/frontend/src/business/components/api/definition/components/mock/Components/MockResponseParam.vue index 2b53ef10e7..457ee7fe5b 100644 --- a/frontend/src/business/components/api/definition/components/mock/Components/MockResponseParam.vue +++ b/frontend/src/business/components/api/definition/components/mock/Components/MockResponseParam.vue @@ -36,7 +36,7 @@ -
+

{{ $t('api_test.definition.request.post_script') }}

diff --git a/frontend/src/business/components/api/definition/components/mock/MockTab.vue b/frontend/src/business/components/api/definition/components/mock/MockTab.vue index 54ae81d200..d7b8595cbb 100644 --- a/frontend/src/business/components/api/definition/components/mock/MockTab.vue +++ b/frontend/src/business/components/api/definition/components/mock/MockTab.vue @@ -2,7 +2,7 @@
- {{ $t('project.version.name') }}: {{ mockConfigData.versionName }} + {{ $t('project.version.name') }}: {{ versionName }}