From 134858be017d0098bb2e5d0fea36a74f291e86bf Mon Sep 17 00:00:00 2001 From: ruibaby Date: Wed, 1 May 2019 23:21:02 +0800 Subject: [PATCH] Fixed some error. --- src/api/comment.js | 14 ++++ .../components/AttachmentSelectDrawer.vue | 7 +- src/views/comment/CommentList.vue | 52 +++++++++--- src/views/interface/ThemeList.vue | 7 +- src/views/system/OptionForm.vue | 83 ++++++++++++++----- src/views/user/Profile.vue | 1 + 6 files changed, 127 insertions(+), 37 deletions(-) diff --git a/src/api/comment.js b/src/api/comment.js index 996d0aa2..97a300d8 100644 --- a/src/api/comment.js +++ b/src/api/comment.js @@ -19,6 +19,20 @@ commentApi.query = params => { }) } +commentApi.updateStatus = (commentId, status) => { + return service({ + url: `${baseUrl}/${commentId}/status/${status}`, + method: 'put' + }) +} + +commentApi.delete = commentId => { + return service({ + url: `${baseUrl}/${commentId}`, + method: 'delete' + }) +} + commentApi.commentStatus = { PUBLISHED: { color: 'green', diff --git a/src/views/attachment/components/AttachmentSelectDrawer.vue b/src/views/attachment/components/AttachmentSelectDrawer.vue index 56a655af..42a0bc6b 100644 --- a/src/views/attachment/components/AttachmentSelectDrawer.vue +++ b/src/views/attachment/components/AttachmentSelectDrawer.vue @@ -1,7 +1,7 @@