diff --git a/src/api/journal.js b/src/api/journal.js index 61a3ced8..2f94d715 100644 --- a/src/api/journal.js +++ b/src/api/journal.js @@ -35,4 +35,11 @@ journalApi.delete = journalId => { }) } +journalApi.commentTree = journalId => { + return service({ + url: `${baseUrl}/${journalId}/comments/tree_view`, + method: 'get' + }) +} + export default journalApi diff --git a/src/api/journalComment.js b/src/api/journalComment.js new file mode 100644 index 00000000..8950b45d --- /dev/null +++ b/src/api/journalComment.js @@ -0,0 +1,22 @@ +import service from '@/utils/service' + +const baseUrl = '/api/admin/journals/comments' + +const journalCommentApi = {} + +journalCommentApi.create = (comment) => { + return service({ + url: baseUrl, + data: comment, + method: 'post' + }) +} + +journalCommentApi.delete = commentId => { + return service({ + url: `${baseUrl}/${commentId}`, + method: 'delete' + }) +} + +export default journalCommentApi diff --git a/src/views/sheet/internal/JournalList.vue b/src/views/sheet/internal/JournalList.vue index 2a6780f4..013fd4f8 100644 --- a/src/views/sheet/internal/JournalList.vue +++ b/src/views/sheet/internal/JournalList.vue @@ -65,9 +65,7 @@ >