diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-start/src/test/java/org/jeecg/modules/openapi/test/SampleOpenApiTest.java b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/test/java/org/jeecg/modules/openapi/test/SampleOpenApiTest.java index 78e87026e..1402623c1 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-start/src/test/java/org/jeecg/modules/openapi/test/SampleOpenApiTest.java +++ b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/test/java/org/jeecg/modules/openapi/test/SampleOpenApiTest.java @@ -41,7 +41,17 @@ public class SampleOpenApiTest { // 解析JSON响应 JSONObject res = JSON.parseObject(responseBody); - System.out.println("[info] 调用成功: " + res.toJSONString()); + //错误日志判断 + if(res.containsKey("success")){ + Boolean success = res.getBoolean("success"); + if(success){ + System.out.println("[info] 调用成功: " + res.toJSONString()); + }else{ + System.out.println("[error] 调用失败: " + res.getString("message")); + } + }else{ + System.out.println("[error] 调用失败: " + res.getString("message")); + } } } diff --git a/jeecgboot-vue3/src/views/openapi/OpenApi.data.ts b/jeecgboot-vue3/src/views/openapi/OpenApi.data.ts index 4c3345087..a94b4da0c 100644 --- a/jeecgboot-vue3/src/views/openapi/OpenApi.data.ts +++ b/jeecgboot-vue3/src/views/openapi/OpenApi.data.ts @@ -67,6 +67,11 @@ export const formSchema: FormSchema[] = [ ]; }, }, + { + label: '原始地址', + field: 'originUrl', + component: 'Input', + }, { label: '请求方法', field: 'requestMethod', @@ -127,11 +132,6 @@ export const formSchema: FormSchema[] = [ component:"Input", field: 'body' }, - { - label: '原始地址', - field: 'originUrl', - component: 'Input', - }, { label: '删除标识', field: 'delFlag', @@ -252,7 +252,6 @@ export const openApiHeaderJVxeColumns: JVxeColumn[] = [ title: '备注', key: 'note', type: JVxeTypes.input, - width:"200px", placeholder: '请输入${title}', defaultValue:'', }, @@ -297,7 +296,6 @@ export const openApiParamJVxeColumns: JVxeColumn[] = [ title: '备注', key: 'note', type: JVxeTypes.input, - width:"200px", placeholder: '请输入${title}', defaultValue:'', }, diff --git a/jeecgboot-vue3/src/views/openapi/OpenApiAuth.api.ts b/jeecgboot-vue3/src/views/openapi/OpenApiAuth.api.ts index 352c78c9e..c2792c94b 100644 --- a/jeecgboot-vue3/src/views/openapi/OpenApiAuth.api.ts +++ b/jeecgboot-vue3/src/views/openapi/OpenApiAuth.api.ts @@ -97,7 +97,7 @@ export const saveOrUpdate = (params, isUpdate) => { * 全部权限列表接口 * @param params */ -export const getApiList = (params) => defHttp.get({ url: Api.apiList, params }); +export const getApiList = (params) => defHttp.get({ url: Api.apiList, params }, { isTransformResponse: false }); /** * 获取已授权项目的接口 diff --git a/jeecgboot-vue3/src/views/openapi/components/AuthForm.vue b/jeecgboot-vue3/src/views/openapi/components/AuthForm.vue index 7f5cbb482..fdbaeb1fc 100644 --- a/jeecgboot-vue3/src/views/openapi/components/AuthForm.vue +++ b/jeecgboot-vue3/src/views/openapi/components/AuthForm.vue @@ -1,60 +1,66 @@ - - - - - + + + + + 接口名称: {{ item.name }} + handleChange(e, item)"> + + + 请求方式: {{item.requestMethod}} + + + + +