From f05ed3b00dcdac0cb895cbddf256f2a18b16b3f8 Mon Sep 17 00:00:00 2001 From: zaoangod Date: Tue, 6 Nov 2018 10:05:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=89=8D=E7=AB=AFjs=E5=9B=A0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=BA=E7=A9=BA=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/admin/comments.html | 3 +++ src/main/resources/templates/admin/index.html | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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);