diff --git a/ruoyi-ui/src/views/business/openapi/copywriting/index.vue b/ruoyi-ui/src/views/business/openapi/copywriting/index.vue index f800ef4b..f77c19cd 100644 --- a/ruoyi-ui/src/views/business/openapi/copywriting/index.vue +++ b/ruoyi-ui/src/views/business/openapi/copywriting/index.vue @@ -171,7 +171,7 @@ export default { // 查询参数 queryParams: { pageNum: 1, - pageSize: 10, + pageSize: 30, content: null, source: null, createTime: null, diff --git a/ruoyi-ui/src/views/business/openapi/log/index.vue b/ruoyi-ui/src/views/business/openapi/log/index.vue index abc73728..a63f70c5 100644 --- a/ruoyi-ui/src/views/business/openapi/log/index.vue +++ b/ruoyi-ui/src/views/business/openapi/log/index.vue @@ -190,6 +190,8 @@ export default { isSuccess: null, createTime: null }; + this.request=null + this.response=null this.resetForm("form"); }, /** 搜索按钮操作 */ @@ -201,8 +203,19 @@ export default { handleView(row) { this.open = true; this.form = row; - this.request = eval('(' + this.form.request + ')'); - this.response=JSON.parse(this.form.response) + try { + this.request = JSON.parse(this.form.request) + this.response=JSON.parse(this.form.response) + } catch(err) { + this.open = false; + this.$notify({ + title: '警告', + message: '参数不是json格式!!!', + type: 'warning' + }); + + } + }, /** 重置按钮操作 */ resetQuery() { diff --git a/xjs-business/xjs-business-openapi/src/main/java/com/xjs/common/aop/ApiLogAspect.java b/xjs-business/xjs-business-openapi/src/main/java/com/xjs/common/aop/ApiLogAspect.java index 0e8d0c2b..fc728cef 100644 --- a/xjs-business/xjs-business-openapi/src/main/java/com/xjs/common/aop/ApiLogAspect.java +++ b/xjs-business/xjs-business-openapi/src/main/java/com/xjs/common/aop/ApiLogAspect.java @@ -105,10 +105,16 @@ public class ApiLogAspect { entity.setUrl(url); Object[] args = joinPoint.getArgs();//请求体 StringBuilder builder = new StringBuilder(); - for (Object arg : args) { - String json = JSON.toJSONString(arg); - builder.append(json); + for (int i = 0; i < args.length; i++) { + String json = JSON.toJSONString(args[i]); + //判断最后一位 + if (i == args.length - 1) { + builder.append(json); + }else { + builder.append(json + ","); + } } + entity.setMethod(apiLog.method()); entity.setRequest(builder.toString()); if (Objects.nonNull(jsonResult)) {