diff --git a/src/main/java/com/tale/controller/admin/AdminApiController.java b/src/main/java/com/tale/controller/admin/AdminApiController.java index ce6c5929..011db7fd 100644 --- a/src/main/java/com/tale/controller/admin/AdminApiController.java +++ b/src/main/java/com/tale/controller/admin/AdminApiController.java @@ -167,12 +167,6 @@ public RestResponse updatePage(@BodyParam Contents contents) { return RestResponse.ok(cid); } - @GetRoute("categories") - public RestResponse categories() { - List categories = metasService.getMetas(Types.CATEGORY); - return RestResponse.ok(categories); - } - @SysLog("保存分类") @PostRoute("category/save") public RestResponse saveCategory(@BodyParam MetaParam metaParam) { diff --git a/src/main/resources/templates/admin/comments.html b/src/main/resources/templates/admin/comments.html index 0b7c624c..dfbff820 100644 --- a/src/main/resources/templates/admin/comments.html +++ b/src/main/resources/templates/admin/comments.html @@ -110,6 +110,9 @@

评论管理

}, success: function (data) { $vm.commentPage = data.payload + if(!data.payload.rows){ + $vm.commentPage.rows = [] + } }, error: function (error) { console.log(error); diff --git a/src/main/resources/templates/admin/index.html b/src/main/resources/templates/admin/index.html index baab756d..a284c884 100644 --- a/src/main/resources/templates/admin/index.html +++ b/src/main/resources/templates/admin/index.html @@ -160,7 +160,11 @@

系统日志

tale.get({ url: '/admin/api/comments', success: function (data) { - $vm.comments = data.payload.rows + if(!data.payload.rows){ + $vm.comments = []; + }else{ + $vm.comments = data.payload.rows; + } }, error: function (error) { console.log(error);