|
|
@@ -4,7 +4,7 @@ import {
|
|
|
import axios from '@/plugins/axios'
|
|
|
import httpCode from '@/server/enums/http-code'
|
|
|
|
|
|
-export function createComment(slideId, pageNumber, title, content) {
|
|
|
+export function createComment ({ slideId, pageNumber, title, content }) {
|
|
|
const data = {
|
|
|
slideId,
|
|
|
pageNumber,
|
|
|
@@ -23,7 +23,7 @@ export function createComment(slideId, pageNumber, title, content) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-export function removeComment(commentId) {
|
|
|
+export function removeComment ({ commentId }) {
|
|
|
return axios
|
|
|
.delete(useCommentServer('/' + commentId))
|
|
|
.then(res => {
|
|
|
@@ -36,7 +36,7 @@ export function removeComment(commentId) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-export function topComment(commentId) {
|
|
|
+export function topComment ({ commentId }) {
|
|
|
return axios
|
|
|
.post(useCommentServer('/' + commentId + '/top'))
|
|
|
.then(res => {
|
|
|
@@ -49,7 +49,7 @@ export function topComment(commentId) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-export function unTopComment(commentId) {
|
|
|
+export function unTopComment ({ commentId }) {
|
|
|
return axios
|
|
|
.post(useCommentServer('/' + commentId + '/unTop'))
|
|
|
.then(res => {
|
|
|
@@ -62,7 +62,7 @@ export function unTopComment(commentId) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-export function getComments(slideId, pageNumber, { key = '', page = 0, size = 2000, sort = '' }) {
|
|
|
+export function getComments (slideId, pageNumber, { key = '', page = 0, size = 2000, sort = '' }) {
|
|
|
return axios
|
|
|
.get(useCommentServer('/slide/' + slideId), {
|
|
|
params: {
|